26 lines
649 B
PHP
26 lines
649 B
PHP
<?php
|
|
|
|
namespace Database\Factories;
|
|
|
|
use App\Models\NewsStory;
|
|
use Illuminate\Database\Eloquent\Factories\Factory;
|
|
use Illuminate\Support\Carbon;
|
|
|
|
class NewsStoryFactory extends Factory
|
|
{
|
|
protected $model = NewsStory::class;
|
|
|
|
public function definition(): array
|
|
{
|
|
return [
|
|
'headline' => $this->faker->sentence(),
|
|
'body' => $this->faker->realText(),
|
|
'start_publication_date' => Carbon::now(),
|
|
'stop_publication_date' => Carbon::now()->addDays(7),
|
|
'active' => '1',
|
|
'created_at' => Carbon::now(),
|
|
'updated_at' => Carbon::now(),
|
|
];
|
|
}
|
|
}
|