mirror of
https://github.com/VueFileManager/vuefilemanager.git
synced 2026-04-26 10:30:38 +00:00
controller refactoring part 25
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
<?php
|
||||
|
||||
|
||||
namespace Domain\Pages\Actions;
|
||||
|
||||
|
||||
use Domain\Pages\Models\Page;
|
||||
|
||||
class SeedDefaultPagesAction
|
||||
{
|
||||
/**
|
||||
* Store default pages content like Terms of Service, Privacy Policy and Cookie Policy into database
|
||||
*/
|
||||
public function __invoke(): void
|
||||
{
|
||||
collect(config('content.pages'))
|
||||
->each(fn ($page) => Page::updateOrCreate($page));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user