mirror of
https://github.com/HDInnovations/UNIT3D-Community-Edition.git
synced 2026-02-13 07:00:12 -06:00
38 lines
770 B
PHP
38 lines
770 B
PHP
<?php
|
|
|
|
/* @var \Illuminate\Database\Eloquent\Factory $factory */
|
|
|
|
namespace Database\Factories;
|
|
|
|
use App\Models\Thank;
|
|
use App\Models\Torrent;
|
|
use App\Models\User;
|
|
use Illuminate\Database\Eloquent\Factories\Factory;
|
|
|
|
class ThankFactory extends Factory
|
|
{
|
|
/**
|
|
* The name of the factory's corresponding model.
|
|
*
|
|
* @var string
|
|
*/
|
|
protected $model = Thank::class;
|
|
|
|
/**
|
|
* Define the model's default state.
|
|
*
|
|
* @return array
|
|
*/
|
|
public function definition()
|
|
{
|
|
return [
|
|
'user_id' => function () {
|
|
return User::factory()->create()->id;
|
|
},
|
|
'torrent_id' => function () {
|
|
return Torrent::factory()->create()->id;
|
|
},
|
|
];
|
|
}
|
|
}
|