Created
May 18, 2021 10:22
-
-
Save nukedbit/f2df366567f9bf819b715da5ba417f88 to your computer and use it in GitHub Desktop.
UserSeeder
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace Database\\Seeders; | |
use Illuminate\\Database\\Seeder; | |
use Illuminate\\Support\\Facades\\App; | |
use Illuminate\\Support\\Facades\\Hash; | |
use Illuminate\\Support\\Str; | |
class UserSeeder extends Seeder | |
{ | |
/** | |
* Run the database seeds. | |
* | |
* @return void | |
*/ | |
public function run() | |
{ | |
if (App::environment('local')) { | |
\\App\\Models\\User::insert([ | |
[ | |
'name' => 'Admin', | |
'email' => 'admin@localhost', | |
'email_verified_at' => now(), | |
'password' => Hash::make("admin@pwd23"), // password | |
'remember_token' => Str::random(10) | |
] | |
]); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment