Removed unnecessary comments and updated UserSeeder
This commit is contained in:
@@ -7,12 +7,7 @@ use Illuminate\Database\Seeder;
|
||||
|
||||
class CategorySeeder extends Seeder
|
||||
{
|
||||
/**
|
||||
* Run the database seeds.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function run()
|
||||
public function run(): void
|
||||
{
|
||||
$categories = [
|
||||
['name' => 'Wszystkie', 'slug' => 'all', 'default' => true, 'visible' => true],
|
||||
|
@@ -6,14 +6,8 @@ use Illuminate\Database\Seeder;
|
||||
|
||||
class DatabaseSeeder extends Seeder
|
||||
{
|
||||
/**
|
||||
* Seed the application's database.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function run()
|
||||
public function run(): void
|
||||
{
|
||||
// \App\Models\User::factory(10)->create();
|
||||
$this->call(CategorySeeder::class);
|
||||
$this->call(UserSeeder::class);
|
||||
}
|
||||
|
@@ -8,18 +8,8 @@ use Illuminate\Support\Facades\Hash;
|
||||
|
||||
class UserSeeder extends Seeder
|
||||
{
|
||||
/**
|
||||
* Run the database seeds.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function run()
|
||||
public function run(): void
|
||||
{
|
||||
User::query()
|
||||
->create([
|
||||
'name' => 'Kamil Niemczycki',
|
||||
'email' => 'admin@admin.pl',
|
||||
'password' => Hash::make('password123^')
|
||||
]);
|
||||
User::factory(['email' => 'admin@admin.pl'])->create();
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user