Файловый менеджер - Редактировать - /home/c7lekhnath/silverray.com.au/Modules/Counter/database/seeders/CounterDatabaseSeeder.php
Назад
<?php namespace Modules\Counter\database\seeders; use Illuminate\Database\Seeder; use Modules\Counter\app\Models\Counter; use Modules\Counter\app\Models\CounterTranslation; class CounterDatabaseSeeder extends Seeder { /** * Run the database seeds. */ public function run(): void { $quantity = 100; $icon = 'counter.png'; for ($i = 1; $i <= 4; $i++) { $counter = new Counter(); $counter->icon = $icon; $counter->qty = $quantity; $counter->save(); } $counters = Counter::all(); foreach($counters as $counter){ $languages = allLanguages(); foreach($languages as $language){ $translation = new CounterTranslation(); $translation->counter_id = $counter->id; $translation->lang_code = $language->code; $translation->title = 'Winning Award'; $translation->save(); } } } }
| ver. 1.4 |
Github
|
.
| PHP 8.3.20 | Генерация страницы: 0.03 |
proxy
|
phpinfo
|
Настройка