Files
UNIT3D-Community-Edition/database/factories/ThankFactory.php
2020-12-15 19:06:09 -05:00

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;
},
];
}
}