mirror of
https://github.com/VueFileManager/vuefilemanager.git
synced 2026-04-18 16:22:14 +00:00
controller refactoring part 25
This commit is contained in:
21
src/Domain/Settings/Actions/SeedDefaultSettingsAction.php
Normal file
21
src/Domain/Settings/Actions/SeedDefaultSettingsAction.php
Normal file
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
|
||||
|
||||
namespace Domain\Settings\Actions;
|
||||
|
||||
|
||||
use Domain\Settings\Models\Setting;
|
||||
|
||||
class SeedDefaultSettingsAction
|
||||
{
|
||||
/**
|
||||
* Store default VueFileManager settings into database
|
||||
*/
|
||||
public function __invoke(
|
||||
string $license
|
||||
): void {
|
||||
collect(
|
||||
config('content.content.' . strtolower($license))
|
||||
)->each(fn ($content) => Setting::forceCreate($content));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user