Fixed UserSeeder.php.
This commit is contained in:
parent
3cfcd980f4
commit
c1627c2fa4
|
@ -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";
|
||||
|
|
Loading…
Reference in New Issue