Search
 
SCRIPT & CODE EXAMPLE
 

PHP

laravel default authentication redirectTo

// comment line and add function

// protected $redirectTo = RouteServiceProvider::HOME;
public function redirectTo(){
  return Auth::user()->type == 'admin' ? route('admin.home') : route('staff.home');
}
Comment

PREVIOUS NEXT
Code Example
Php :: php extract array 
Php :: how to use stored procedure in laravel 
Php :: php recursive function to build array 
Php :: php boolean to string 
Php :: php now 
Php :: get where different laravel 
Php :: pdo bind param 
Php :: web scraping in php 
Php :: php check if object is empty 
Php :: php switch case default 
Php :: laravel apache public folder 
Php :: composer_update 
Php :: laravel redirect to controller method 
Php :: carbon get day name from date 
Php :: codeigniter 4 redirect with data 
Php :: spl_autoload_register 
Php :: square root php 
Php :: Get only time from timestamp in laravel 
Php :: php take picture with mobile camera 
Php :: Laravel Retrieve Session Data with default 
Php :: laravel guest blade 
Php :: layout.blade.php in laravel 
Php :: how to get ip address of pc in php 
Php :: laravel hasmany 
Php :: laravel eloquent search json column 
Php :: laravel storage 
Php :: laravel logout current user 
Php :: PHP strstr — Find the first occurrence of a string 
Php :: why does php syntax doesnt work in my html 
Php :: laravel set appends 
ADD CONTENT
Topic
Content
Source link
Name
3+4 =