46 lines
1.2 KiB
PHP
46 lines
1.2 KiB
PHP
<?php
|
|
|
|
namespace Database\Seeders;
|
|
|
|
use Illuminate\Database\Seeder;
|
|
use Illuminate\Support\Facades\DB;
|
|
|
|
class DocumentSeeder extends Seeder
|
|
{
|
|
/**
|
|
* Run the database seeds.
|
|
*/
|
|
public function run(): void
|
|
{
|
|
DB::table('documents')->insert([
|
|
[
|
|
'name' => 'файл 1',
|
|
'file_name' => 'file1',
|
|
'description' => 'description1',
|
|
'url' => 'url/url1',
|
|
'position' => 2,
|
|
'admission_id' => 1,
|
|
'created_at' => now(),
|
|
],
|
|
[
|
|
'name' => 'файл 2',
|
|
'description' => 'description2',
|
|
'file_name' => 'file2',
|
|
'url' => 'url/url2',
|
|
'position' => 3,
|
|
'admission_id' => 1,
|
|
'created_at' => now(),
|
|
],
|
|
[
|
|
'name' => 'файл 3',
|
|
'file_name' => 'file3',
|
|
'description' => 'description3',
|
|
'url' => 'url/url3',
|
|
'admission_id' => 1,
|
|
'position' => 1,
|
|
'created_at' => now(),
|
|
]
|
|
]);
|
|
}
|
|
}
|