25 lignes
650 o
PHP
25 lignes
650 o
PHP
|
<?php
|
||
|
|
||
|
namespace Database\Factories;
|
||
|
|
||
|
use Illuminate\Database\Eloquent\Factories\Factory;
|
||
|
use App\Http\Controllers\Core\Users;
|
||
|
use App\Http\Utility\debug;
|
||
|
|
||
|
class ProfileFactory extends Factory
|
||
|
{
|
||
|
|
||
|
public function definition(){
|
||
|
$adminList=Users::getAdminIdList();
|
||
|
$creatorId=$adminList[rand(0, count($adminList)-1)];
|
||
|
return [
|
||
|
'name'=>$this->faker->firstName(),
|
||
|
'last_name'=>$this->faker->lastName(),
|
||
|
'creator_id'=>$creatorId,
|
||
|
'status'=>$this->faker->numberBetween(0, 2),
|
||
|
'creation_date' => time(),
|
||
|
'modification_date' => time(),
|
||
|
];
|
||
|
}
|
||
|
}
|