39 lines
1.1 KiB
PHP
39 lines
1.1 KiB
PHP
|
|
<?php
|
||
|
|
|
||
|
|
namespace Modules\Frontend\Database\Seeders;
|
||
|
|
|
||
|
|
use Illuminate\Database\Seeder;
|
||
|
|
use Illuminate\Support\Facades\DB;
|
||
|
|
|
||
|
|
class CmsSectionsSeeder extends Seeder
|
||
|
|
{
|
||
|
|
/**
|
||
|
|
* Run the database seeds.
|
||
|
|
*/
|
||
|
|
public function run(): void
|
||
|
|
{
|
||
|
|
$sections = [
|
||
|
|
['name' => 'banner', 'serial' => 1],
|
||
|
|
['name' => 'about_us', 'serial' => 2],
|
||
|
|
['name' => 'why_choose_us', 'serial' => 3],
|
||
|
|
['name' => 'signature_creation', 'serial' => 4],
|
||
|
|
['name' => 'main_menu', 'serial' => 5],
|
||
|
|
['name' => 'chef', 'serial' => 6],
|
||
|
|
['name' => 'table_reservation', 'serial' => 7],
|
||
|
|
['name' => 'testimonial', 'serial' => 8],
|
||
|
|
['name' => 'visit_us', 'serial' => 9],
|
||
|
|
['name' => 'newsletter', 'serial' => 10],
|
||
|
|
];
|
||
|
|
|
||
|
|
foreach ($sections as $section) {
|
||
|
|
DB::table('c_m_s_sections')->insert([
|
||
|
|
'restaurant_id' => 1,
|
||
|
|
'name' => $section['name'],
|
||
|
|
'serial' => $section['serial'],
|
||
|
|
'created_at' => now(),
|
||
|
|
'updated_at' => now(),
|
||
|
|
]);
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|