Skip to content

Instantly share code, notes, and snippets.

@andri-sudarmawijaya
Created January 7, 2018 14:03
Show Gist options
  • Save andri-sudarmawijaya/7e30e47a181a02ef53a31ccfcdd6c1a4 to your computer and use it in GitHub Desktop.
Save andri-sudarmawijaya/7e30e47a181a02ef53a31ccfcdd6c1a4 to your computer and use it in GitHub Desktop.
How to reset laravel admin password using seeder
- edit file .\database\seeds\DatabaseSeeder.php
- add $this->call(AdminUserSeeder::class);
```
public function run()
{
$this->call(AdminUserSeeder::class);
//$this->call(UsersTableSeeder::class);
}
```
edit file .\database\seeds\AdminUserSeeder.php
or file .\database\seeds\UsersTableSeeder.php
```
public function run()
{
$faker = Faker\Factory::create();
App\User::create([
'name' => 'user',
'email' =>'[email protected]',
'password' => bcrypt('123456'),
]);
}
```
- jalankan
```
php artisan migrate --seed
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment