WIP
This commit is contained in:
@@ -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,
|
||||
];
|
||||
}
|
||||
|
||||
@@ -34,6 +34,4 @@ class CategoryFactory extends Factory
|
||||
'cover' => './covers/image-'.rand(1,12).'-big.jpg',
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -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();
|
||||
});
|
||||
|
||||
@@ -17,6 +17,7 @@ class DatabaseSeeder extends Seeder
|
||||
TagSeeder::class,
|
||||
CategorySeeder::class,
|
||||
AlbumSeeder::class,
|
||||
ImageSeeder::class,
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user