ldc-crm/database/factories/CustomerLoginFactory.php
Jérémy Munsch 83657ef6bf - working testing env
- use php artisan serve to run test + autokill
- autodebug if envirronement is testing
2021-08-05 15:00:28 +02:00

40 lines
851 B
PHP

<?php
namespace Database\Factories;
use App\Models\CustomerLogin;
use Illuminate\Database\Eloquent\Factories\Factory;
use Illuminate\Support\Facades\Hash;
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 = true;
}
return [
'password' => 'testPassword',
'last_connection' => $this->faker->date(),
'status' => $bool
];
}
}