Skip to content

Commit

Permalink
adds seeder to seed the super admin
Browse files Browse the repository at this point in the history
  • Loading branch information
supportsitewill authored Dec 30, 2024
1 parent d872caa commit 6875782
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions database/seeders/SuperAdminSeeder.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<?php

namespace Database\Seeders;

use Illuminate\Database\Seeder;
use Illuminate\Support\Carbon;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Hash;

class SuperAdminSeeder extends Seeder
{
public function run(): void
{
DB::table('users')->insert([
'name' => 'dev',
'email' => '[email protected]',
'password' => Hash::make('12345678'),
'role_admin' => true,
'role_user' => false,
'super_admin' => true,
'created_at' => Carbon::now()->format('Y-m-d H:i:s'),
'updated_at' => Carbon::now()->format('Y-m-d H:i:s'),
]);
}
}

0 comments on commit 6875782

Please sign in to comment.