This commit is contained in:
2024-05-23 16:51:55 +02:00
parent 6d4dd5f653
commit fc2b66528b
19 changed files with 277 additions and 114 deletions

View File

@@ -20,7 +20,6 @@ class AlbumFactory extends Factory
{
return [
'name' => fake()->sentence(2),
'cover' => './covers/image-'.rand(1,12).'-big.jpg',
'category_id' => Category::all()->random(1)->first()->id,
];
}

View File

@@ -34,6 +34,4 @@ class CategoryFactory extends Factory
'cover' => './covers/image-'.rand(1,12).'-big.jpg',
];
}
}

View File

@@ -15,7 +15,6 @@ return new class extends Migration
Schema::create('albums', function (Blueprint $table) {
$table->id();
$table->string('name');
$table->string('cover');
$table->foreignIdFor(Category::class);
$table->timestamps();
});

View File

@@ -17,6 +17,7 @@ class DatabaseSeeder extends Seeder
TagSeeder::class,
CategorySeeder::class,
AlbumSeeder::class,
ImageSeeder::class,
]);
}
}