generated from Logisim-Evolution/Laravel-Docker
Etape 5
This commit is contained in:
@@ -17,7 +17,9 @@ class GenresFactory extends Factory
|
||||
public function definition(): array
|
||||
{
|
||||
return [
|
||||
//
|
||||
"lib_genre" => fake()->text(20),
|
||||
"created_at" => now(),
|
||||
"updated_at" => now()
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,7 +17,12 @@ class MangasFactory extends Factory
|
||||
public function definition(): array
|
||||
{
|
||||
return [
|
||||
//
|
||||
"prix" => fake()->randomFloat(),
|
||||
"titre" => fake()->text(20),
|
||||
"couverture" => fake()->text(20),
|
||||
"genre_id" => fake()->numberBetween(1, 5),
|
||||
"created_at" => now(),
|
||||
"updated_at" => now()
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,6 +4,7 @@ namespace Database\Seeders;
|
||||
|
||||
use Illuminate\Database\Console\Seeds\WithoutModelEvents;
|
||||
use Illuminate\Database\Seeder;
|
||||
use App\Models\Genres;
|
||||
|
||||
class GenresSeeder extends Seeder
|
||||
{
|
||||
@@ -12,6 +13,6 @@ class GenresSeeder extends Seeder
|
||||
*/
|
||||
public function run(): void
|
||||
{
|
||||
//
|
||||
Genres::factory(5)->create();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,6 +4,7 @@ namespace Database\Seeders;
|
||||
|
||||
use Illuminate\Database\Console\Seeds\WithoutModelEvents;
|
||||
use Illuminate\Database\Seeder;
|
||||
use App\Models\Mangas;
|
||||
|
||||
class MangasSeeder extends Seeder
|
||||
{
|
||||
@@ -12,6 +13,6 @@ class MangasSeeder extends Seeder
|
||||
*/
|
||||
public function run(): void
|
||||
{
|
||||
//
|
||||
Mangas::factory(10)->create();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user