add new admin user for cief employees, and added temporary redirect to forwarder dashboard for admin and super admin users

This commit is contained in:
omair saleh
2020-09-21 13:02:05 +08:00
parent 89e8f44c8f
commit 1e735a0fd3
2 changed files with 11 additions and 2 deletions
@@ -11,8 +11,8 @@ class AuthenticationRedirect
public function url(){ public function url(){
$userRole = (int) Auth()->user()->role_id; $userRole = (int) Auth()->user()->role_id;
if($userRole === Roles::ADMIN){ if($userRole === Roles::ADMIN || $userRole === Roles::SUPER_ADMIN){
return route('admin.dashboard'); return route('dashboard.forwarder');
} }
return route('dashboard.importer', ['id' => Auth()->user()->employers->first()->company->id]); return route('dashboard.importer', ['id' => Auth()->user()->employers->first()->company->id]);
+9
View File
@@ -24,6 +24,15 @@ class UsersTableSeeder extends Seeder
'role_id' => Roles::SUPER_ADMIN, 'role_id' => Roles::SUPER_ADMIN,
'created_at' => \Carbon\Carbon::now(), 'created_at' => \Carbon\Carbon::now(),
'updated_at' => \Carbon\Carbon::now() 'updated_at' => \Carbon\Carbon::now()
],
[
'name' => 'CIEF Worldwide',
'email' => 'admin@cief-malaysia.com',
'password' => Hash::make('123456abcabc'),
'email_verified_at' => \Carbon\Carbon::now(),
'role_id' => Roles::ADMIN,
'created_at' => \Carbon\Carbon::now(),
'updated_at' => \Carbon\Carbon::now()
] ]
]); ]);