added it_get_all_pages, it_get_page, it_update_page test

This commit is contained in:
Peter Papp
2021-03-05 11:02:13 +01:00
parent 779b7fc8ba
commit e514994b08
7 changed files with 86 additions and 49 deletions

View File

@@ -4,6 +4,7 @@
namespace App\Services;
use App\Models\Page;
use Illuminate\Support\Facades\Storage;
class SetupService
@@ -24,4 +25,15 @@ class SetupService
Storage::makeDirectory($directory);
});
}
/**
* Store default pages content like Terms of Service, Privacy Policy and Cookie Policy into database
*/
public function seed_pages()
{
collect(config('content.pages'))
->each(function ($page) {
Page::updateOrCreate($page);
});
}
}