Landing page not found issue fixed
If the landing page is not found redirect to dashboard
This commit is contained in:
parent
cb2ad9a2ad
commit
1c0c4b3e1e
@ -3,6 +3,7 @@
|
||||
namespace App\Traits;
|
||||
|
||||
use App\Models\Auth\UserInvitation;
|
||||
use Illuminate\Support\Facades\Route;
|
||||
|
||||
trait Users
|
||||
{
|
||||
@ -102,7 +103,9 @@ trait Users
|
||||
return route('login');
|
||||
}
|
||||
|
||||
$route_name = $user->isCustomer() ? 'portal.dashboard' : $user->landing_page;
|
||||
$route_name = $user->isCustomer()
|
||||
? 'portal.dashboard'
|
||||
: (Route::has($user->landing_page) ? $user->landing_page : 'dashboard');
|
||||
|
||||
$company_id = company_id() ?: $this->getFirstCompanyOfUser()?->id;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user