I am using laravel 5.3. Suppose I am at (url.com)/posts/5
in a laravel application. Now I want to login. After login I want to redirect back to this url. All I want to edit only these lines in Auth Controller. protected $redirectTo = '/';
as Here says in comment Where to redirect users after login / registration.
class LoginController extends Controller
{
use AuthenticatesUsers;
/**
* Where to redirect users after login / registration.
*
* @var string
*/
protected $redirectTo = '/';
public function __construct()
{
$this->middleware('guest', ['except' => 'logout']);
}
}
How can I do that? Note: I am using laravel built-in authentication.
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire