database/factories/SantriFactory.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()
    {
        $rand = rand(1, 3);
        return [
            'nama'          => $this->faker->name(),
            'code'          => $rand . '-' . rand(1000, 10000),
            'password'      => bcrypt('password'),
            'alamat'        => $this->faker->address(),
            'user_id'       => $rand
        ];
    }
public function definition ( ) { $ rand = rand ( 1 , 3 ) ; return [ 'nama' => $ this -> faker -> name ( ) , 'code' => $ rand . '-' . rand ( 1000 , 10000 ) , 'password' => bcrypt ( 'password' ) , 'alamat' => $ this -> faker -> address ( ) , 'user_id' => $ rand ] ; }
Define the model's default state.
Define the model ' s default state .