You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
xshop/database/seeders/DatabaseSeeder.php

39 lines
857 B
PHP

<?php
namespace Database\Seeders;
use App\Models\Customer;
use App\Models\Post;
use App\Models\State;
use Illuminate\Database\Seeder;
use Illuminate\Support\Facades\Storage;
// use Illuminate\Database\Console\Seeds\WithoutModelEvents;
class DatabaseSeeder extends Seeder
{
/**
* Seed the application's database.
*/
public function run(): void
{
// User::factory(10)->create();
Storage::deleteDirectory('public');
Storage::makeDirectory('public');
file_put_contents(storage_path('app/public/.gitignore'),'*
!.gitignore
');
$this->call([
UserSeeder::class,
GroupSeeder::class,
PostSeeder::class,
StateSeeder::class,
CustomerSeeder::class,
CategorySeeder::class,
]
);
}
}