3
0
Fork 0

Delete database/seeds directory

This commit is contained in:
Thomas 2021-08-05 15:58:39 +02:00 committed by GitHub
parent f3e99daa8a
commit 8cea04208a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 0 additions and 73 deletions

View file

@ -1,31 +0,0 @@
<?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');
}
}