database/factories/DepartureFactory.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()
    {
        $terminals = Terminal::all()->pluck('id');
        $rand_time = $this->faker->dateTimeBetween('-3 months', '+3 months');
        return [
            'terminal_id' => $terminals->random(),
            'or_no' => mt_rand(00000000, 999999999),
            'time' => $rand_time,
        ];
    }
public function definition ( ) { $ terminals = Terminal :: all ( ) -> pluck ( 'id' ) ; $ rand_time = $ this -> faker -> dateTimeBetween ( '-3 months' , '+3 months' ) ; return [ 'terminal_id' => $ terminals -> random ( ) , 'or_no' => mt_rand ( 00000000 , 999999999 ) , 'time' => $ rand_time , ] ; }
Define the model's default state.
Define the model ' s default state .
//