take commands from database

This commit is contained in:
DigitalInfinity committed 2026-06-28 15:16:49 +00:00
1 parent 1ac8009173
commit 3ccc525313
3 files changed
+37 -11

No files matched your search

+3 -5
View File
@@ -2,7 +2,6 @@
namespace Database\Seeders;
use App\Models\User;
use Illuminate\Database\Console\Seeds\WithoutModelEvents;
use Illuminate\Database\Seeder;
@@ -10,11 +9,10 @@ class DatabaseSeeder extends Seeder
{
use WithoutModelEvents;
/**
* Seed the application's database.
*/
public function run(): void
{
//
$this->call([
PhotoprofileSeeder::class,
]);
}
}
+25
View File
@@ -0,0 +1,25 @@
<?php
namespace Database\Seeders;
use App\Models\Photoprofile;
use Illuminate\Database\Seeder;
class PhotoprofileSeeder extends Seeder
{
public function run(): void
{
$profiles = [
[
'name' => 'Standard',
'active' => true,
'commands' => 'simplelocalcontrast_p 16,2,0,1,1,1,1,1,1,1,1,0
cl_comic 4,1,0,0,1,15,15,1,10,20,6,2,0,0,0,0,0,0,50,50',
]
];
foreach ($profiles as $profile) {
Photoprofile::firstOrCreate(['name' => $profile['name']], $profile);
}
}
}