applicant-site/database/seeders/FileSeeder.php

45 lines
1.2 KiB
PHP
Raw Normal View History

2024-01-23 17:58:48 +03:00
<?php
namespace Database\Seeders;
use Carbon\Carbon;
use Illuminate\Database\Console\Seeds\WithoutModelEvents;
use Illuminate\Database\Seeder;
use Illuminate\Support\Facades\DB;
class FileSeeder extends Seeder
{
/**
* Run the database seeds.
*/
public function run(): void
{
DB::table('files')->insert([
[
'name' => 'файл 1',
'description' => 'description1',
'url' => 'url/url1',
'position' => 2,
'reception_screen_id' => 1,
'created_at' => Carbon::now(),
],
[
'name' => 'файл 2',
'description' => 'description2',
'url' => 'url/url2',
'position' => 3,
'reception_screen_id' => 1,
'created_at' => Carbon::now(),
],
[
'name' => 'файл 3',
'description' => 'description3',
'url' => 'url/url3',
'reception_screen_id' => 1,
'position' => 1,
'created_at' => Carbon::now(),
]
]);
}
}