applicant-site/database/seeders/NewsSeeder.php

30 lines
665 B
PHP
Raw Permalink Normal View History

2024-03-20 13:09:39 +03:00
<?php
namespace Database\Seeders;
use Illuminate\Database\Console\Seeds\WithoutModelEvents;
use Illuminate\Database\Seeder;
use Illuminate\Support\Facades\DB;
class NewsSeeder extends Seeder
{
/**
* Run the database seeds.
*/
public function run(): void
{
DB::table('news')->insert([
[
'name' => 'Первая новость',
'text' => fake()->realText(),
'photo' => '1',
],
[
'name' => 'Вторая новость',
'text' => fake()->realText(),
'photo' => '2',
],
]);
}
}