osb/database/factories/SiteFactory.php

42 lines
861 B
PHP
Raw Permalink Normal View History

<?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,
'site_id' => $this->faker->numberBetween(255,65535),
'country_id' => $co->id,
'language_id' => $lo->id,
'currency_id' => $cyo->id,
// 'url'', // Needs to be passed in
// admin_id,
];
}
}