Today, We want to share with you Laravel redirect previous page after login.In this post we will show you How to redirect back to original URL after successful login in Laravel, hear for Laravel 5 after login, redirect back to previous/intended url we will give you demo and example for implement.In this post, we will learn about How to redirect back to previous page after login success? with an example.
Laravel redirect previous page after login
There are the Following The simple About custom login and registration in laravel Full Information With Example and source code.
As I will cover this Post with live Working example to develop Laravel Auth: After-Registration Redirect to Previous (Intended) Page, so the Redirect to Previous URL After Logging in, Laravel v5.5 is used for this example is following below.
Laravel after login, redirect back to previous url ?
Laravel is a web application framework with expressive, elegant syntax.The PHP Framework for Web Artisans,freeing you to create without sweating the small things. CRUD Operation With Server Side.
Example 1:
public function signPost() { if ($this->auth->attempt(array('email' => Input::get('email'), 'password' => Input::get('password')))){ return Redirect::intended(); } return back(); }
Example 2:
public function signin() { Session::put('url.intended',URL::previous()); return view('signin'); } public function signPost() { if ($this->auth->attempt(array('email' => Input::get('email'), 'password' => Input::get('password')))){ return Redirect::to(Session::get('url.intended')); } return back(); }
Web Programming Tutorials Example with Demo
Read :
Summary
You can also read about AngularJS, ASP.NET, VueJs, PHP.
I hope you get an idea about redirect to previous page after login.
I would like to have feedback on my infinityknow.com blog.
Your valuable feedback, question, or comments about this article are always welcome.
If you enjoyed and liked this post, don’t forget to share.