mirror of
https://repo.getmonero.org/AnonDev/xmrmemes.git
synced 2024-12-22 22:19:25 -05:00
36 lines
745 B
PHP
36 lines
745 B
PHP
<?php
|
|
|
|
namespace Database\Factories;
|
|
|
|
use App\Models\Meme;
|
|
use App\Models\User;
|
|
use App\Models\Address;
|
|
use Illuminate\Database\Eloquent\Factories\Factory;
|
|
|
|
class MemeFactory extends Factory
|
|
{
|
|
/**
|
|
* The name of the factory's corresponding model.
|
|
*
|
|
* @var string
|
|
*/
|
|
protected $model = Meme::class;
|
|
|
|
private static $address_id = 1;
|
|
|
|
/**
|
|
* Define the model's default state.
|
|
*
|
|
* @return array
|
|
*/
|
|
public function definition()
|
|
{
|
|
return [
|
|
'user_id' => User::all()->random()->id,
|
|
'address_id' => self::$address_id++,
|
|
'title' => $this->faker->sentence($nbWords = 3, $variableNbWords = true),
|
|
'image' => 'blah.png',
|
|
];
|
|
}
|
|
}
|