From c1627c2fa41aba25fec47d01b1232c16dd450b6c Mon Sep 17 00:00:00 2001 From: Sebastian Date: Tue, 30 Jun 2020 10:55:58 +0200 Subject: [PATCH] Fixed UserSeeder.php. --- skolehjem/database/seeds/UserSeeder.php | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/skolehjem/database/seeds/UserSeeder.php b/skolehjem/database/seeds/UserSeeder.php index 389d003..d90fae8 100644 --- a/skolehjem/database/seeds/UserSeeder.php +++ b/skolehjem/database/seeds/UserSeeder.php @@ -2,6 +2,7 @@ use App\User; use Illuminate\Database\Seeder; +use Illuminate\Support\Facades\Log; class UserSeeder extends Seeder { @@ -13,12 +14,19 @@ class UserSeeder extends Seeder public function run() { - try { - if(User::findByName("admin")) - return; - } catch (Exception $e) { +// try { +// +// } catch (Exception $e) { +// } + + Log::debug("YEET"); + + if(User::where("name_first", "admin")) + { + return; } + Log::debug("OPRET"); $user = new \App\User(); $user->name_first = "admin";