ldc-crm/database/factories/CustomerLoginFactory.php
2021-08-10 12:09:49 +02:00

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
];
}
}