applicant-site/database/seeders/NewsSeeder.php

30 lines
665 B
PHP

<?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',
],
]);
}
}