39 lines
815 B
PHP
39 lines
815 B
PHP
<?php
|
|
|
|
namespace Database\Factories;
|
|
|
|
use App\Models\CustomerLogin;
|
|
use Illuminate\Database\Eloquent\Factories\Factory;
|
|
|
|
class CustomerLoginFactory extends Factory
|
|
{
|
|
|
|
protected static $first = false;
|
|
|
|
/**
|
|
* The name of the factory's corresponding model.
|
|
*
|
|
* @var string
|
|
*/
|
|
protected $model = CustomerLogin::class;
|
|
|
|
/**
|
|
* Define the model's default state.
|
|
*
|
|
* @return array
|
|
*/
|
|
public function definition()
|
|
{
|
|
$bool = $this->faker->boolean;
|
|
// Force first to be active
|
|
if (!self::$first) {
|
|
self::$first = true;
|
|
$bool = false;
|
|
}
|
|
return [
|
|
'password' => 'testPassword',
|
|
'last_connection' => $this->faker->date(),
|
|
'status' => $bool
|
|
];
|
|
}
|
|
}
|