2021-06-30 04:00:41 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace Database\Factories;
|
|
|
|
|
|
|
|
use Illuminate\Database\Eloquent\Factories\Factory;
|
|
|
|
use App\Models\{Country,Currency,Language,Site};
|
|
|
|
|
|
|
|
class SiteFactory extends Factory
|
|
|
|
{
|
|
|
|
/**
|
|
|
|
* The name of the factory's corresponding model.
|
|
|
|
*
|
|
|
|
* @var string
|
|
|
|
*/
|
|
|
|
protected $model = Site::class;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Define the model's default state.
|
|
|
|
*
|
|
|
|
* @return array
|
|
|
|
*/
|
|
|
|
public function definition()
|
|
|
|
{
|
|
|
|
// Create Dependencies - should be loaded by seeding.
|
|
|
|
$co = Country::findOrFail(61);
|
|
|
|
$lo = Language::findOrFail(1);
|
|
|
|
$cyo = Currency::findOrFail(6);
|
|
|
|
|
|
|
|
return [
|
|
|
|
'id' => $this->faker->numberBetween(255,65535),
|
|
|
|
// date_orig
|
|
|
|
'active' => TRUE,
|
2021-07-02 00:03:36 +00:00
|
|
|
'site_id' => $this->faker->numberBetween(255,65535),
|
2021-06-30 04:00:41 +00:00
|
|
|
'country_id' => $co->id,
|
|
|
|
'language_id' => $lo->id,
|
|
|
|
'currency_id' => $cyo->id,
|
|
|
|
// 'url'', // Needs to be passed in
|
2021-07-02 00:03:36 +00:00
|
|
|
// admin_id,
|
2021-06-30 04:00:41 +00:00
|
|
|
];
|
|
|
|
}
|
|
|
|
}
|