mirror of
https://github.com/usetrmnl/byos_laravel.git
synced 2026-01-13 15:07:49 +00:00
28 lines
690 B
PHP
28 lines
690 B
PHP
<?php
|
|
|
|
namespace Database\Factories;
|
|
|
|
use App\Models\Device;
|
|
use App\Models\Playlist;
|
|
use App\Models\Plugin;
|
|
use Illuminate\Database\Eloquent\Factories\Factory;
|
|
use Illuminate\Support\Carbon;
|
|
|
|
class PlaylistFactory extends Factory
|
|
{
|
|
protected $model = Playlist::class;
|
|
|
|
public function definition(): array
|
|
{
|
|
return [
|
|
'order' => $this->faker->randomNumber(),
|
|
'is_active' => $this->faker->boolean(),
|
|
'last_displayed_at' => Carbon::now(),
|
|
'created_at' => Carbon::now(),
|
|
'updated_at' => Carbon::now(),
|
|
|
|
'device_id' => Device::factory(),
|
|
'plugin_id' => Plugin::factory(),
|
|
];
|
|
}
|
|
}
|