47 lines
927 B
PHP
47 lines
927 B
PHP
<?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,
|
|
'country_id' => $co->id,
|
|
'language_id' => $lo->id,
|
|
'currency_id' => $cyo->id,
|
|
// 'url'', // Needs to be passed in
|
|
// login_expire,
|
|
// time_format,
|
|
// date_format,
|
|
// decimal_place,
|
|
// module_config,
|
|
// site_details,
|
|
// admin_date,
|
|
];
|
|
}
|
|
}
|