database/factories/UserFactory.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()
    {
        return [
            'name' => $this->faker->name(),
            'email' => $this->faker->unique()->safeEmail(),
            'is_active' => rand(0,1),
            'role_id' => Role::select()->whereNotIn('title', ['Super Admin'])->inRandomOrder()->first()->id,
            'password' => 'password',
            'ts_register'=>Carbon::now()->timestamp
        ];
    }
public function definition ( ) { return [ 'name' => $ this -> faker -> name ( ) , 'email' => $ this -> faker -> unique ( ) -> safeEmail ( ) , 'is_active' => rand ( 0 , 1 ) , 'role_id' => Role :: select ( ) -> whereNotIn ( 'title' , [ 'Super Admin' ] ) -> inRandomOrder ( ) -> first ( ) -> id , 'password' => 'password' , 'ts_register' => Carbon :: now ( ) -> timestamp ] ; }
Define the model's default state.
Define the model ' s default state .