app/Http/Controllers/Auth/LoginController.php
/**
     * After login redirect user to his routes
     *
     * @return userRoute
     */
After login redirect user to his routes
@return userRoute
After login redirect user to his routes @return userRoute
public function redirectTo() {
        if(Auth::user()->roles()->count()!=0)
        {
            $role_name = Auth::user()->roles()->first()->name;
            return $role_name.'/dashboard';
        }
        else {
            return '/';
        }
    }
public function redirectTo ( ) { if ( Auth :: user ( ) -> roles ( ) -> count ( ) != 0 ) { $ role_name = Auth :: user ( ) -> roles ( ) -> first ( ) -> name ; return $ role_name . '/dashboard' ; } else { return '/' ; } }
After login redirect user to his routes
 @return userRoute
After login redirect user to his routes @return userRoute