Fixed UserSeeder.php.

This commit is contained in:
Sebastian Davaris 2020-06-30 10:55:58 +02:00
parent 3cfcd980f4
commit c1627c2fa4
1 changed files with 12 additions and 4 deletions

View File

@ -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";