Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

how to redirect to another page after login in laravel

protected function authenticated(Request $request, $user) {
	 if ($user->role_id == 1) {
	 	return redirect('/admin');
	 } else if ($user->role_id == 2) {
	 	return redirect('/author');
	 } else {
	 	return redirect('/blog');
	 }
}
Source by kaloraat.com #
 
PREVIOUS NEXT
Tagged: #redirect #page #login #laravel
ADD COMMENT
Topic
Name
6+4 =