You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and dots ('.'), can be up to 35 characters long. Letters must be lowercase.
22 lines
455 B
22 lines
455 B
<?php |
|
|
|
namespace Database\Seeders; |
|
|
|
use Illuminate\Database\Console\Seeds\WithoutModelEvents; |
|
use Illuminate\Database\Seeder; |
|
use App\Models\Categorie; |
|
|
|
class CategoriesSeeder extends Seeder |
|
{ |
|
/** |
|
* Run the database seeds. |
|
*/ |
|
public function run(): void |
|
{ |
|
$faker = \Faker\Factory::create(); |
|
for ($i = 0; $i < 8; $i++) |
|
Categorie::create([ |
|
"name" => $faker->title(), |
|
]); |
|
} |
|
}
|
|
|