update patch 1
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
<?php
|
||||
|
||||
use App\Models\Admin;
|
||||
use Illuminate\Database\Seeder;
|
||||
use Illuminate\Support\Facades\Hash;
|
||||
|
||||
class AdminSeeder extends Seeder
|
||||
{
|
||||
/**
|
||||
* Run the database seeds.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function run()
|
||||
{
|
||||
$admin = Admin::where('username', 'superadmin')->first();
|
||||
|
||||
if (is_null($admin)) {
|
||||
$admin = new Admin();
|
||||
$admin->name = "Super Admin";
|
||||
$admin->email = "superadmin@email.com";
|
||||
$admin->username = "superadmin";
|
||||
$admin->password = Hash::make('12345678');
|
||||
$admin->save();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user