database/factories/EventFactory.php
/**
     * Define the model's default state.
     *
     * @return array
     */
Define the model's default state.
@return array
Define the model ' s default state . @return array
public function definition()
    {
        $title = $this->faker->sentences(rand(2, 3));
        return [
            'title' => $title,
            'slug' =>Str::slug($title),
            'content' => $this->faker->sentences(rand(2, 3)),
            'premium' => $this->faker->boolean(25),
            'starts_at' => $this->faker->dateTimeBetween('now', '+2months'),
            'ends_at' => $this->faker->dateTimeBetween('+3months', '+4months'),
        ];
    }
public function definition ( ) { $ title = $ this -> faker -> sentences ( rand ( 2 , 3 ) ) ; return [ 'title' => $ title , 'slug' => Str :: slug ( $ title ) , 'content' => $ this -> faker -> sentences ( rand ( 2 , 3 ) ) , 'premium' => $ this -> faker -> boolean ( 25 ) , 'starts_at' => $ this -> faker -> dateTimeBetween ( 'now' , '+2months' ) , 'ends_at' => $ this -> faker -> dateTimeBetween ( '+3months' , '+4months' ) , ] ; }
Define the model's default state.
Define the model ' s default state .