3
0
Fork 0

Updated to Laravel 9, small fixes, and more

This commit is contained in:
SBDeveloper 2022-11-28 21:07:07 +01:00
parent 6fc52ee512
commit 9fd844ae1a
24 changed files with 5589 additions and 2557 deletions

View file

@ -0,0 +1,31 @@
<?php
use App\User;
use Illuminate\Database\Seeder;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Hash;
class DatabaseSeeder extends Seeder
{
/**
* Seed the application's database.
*
* @return void
*/
public function run()
{
$this->call(PermissionSeeder::class);
$user = User::create([
'firstname' => 'Admin',
'surname' => '',
'email' => 'admin@localhost',
'password' => Hash::make('admin'),
]);
DB::table('users')->where('id', $user->id)->update([
'email_verified_at' => DB::raw('CURRENT_TIMESTAMP')
]);
$user->assignRole('administrator');
}
}