This commit is contained in:
2024-05-15 12:28:03 +02:00
commit 173121216e
123 changed files with 13733 additions and 0 deletions

View File

@@ -0,0 +1,27 @@
<?php
namespace Database\Factories;
use App\Models\Album;
use App\Models\Category;
use Illuminate\Database\Eloquent\Factories\Factory;
/**
* @extends \Illuminate\Database\Eloquent\Factories\Factory<\App\Models\Album>
*/
class AlbumFactory extends Factory
{
/**
* Define the model's default state.
*
* @return array<string, mixed>
*/
public function definition(): array
{
return [
'name' => fake()->sentence(2),
'cover' => './covers/image-'.rand(1,12).'-big.jpg',
'category_id' => Category::all()->random(1)->first()->id,
];
}
}