Create a route for your dashboard which would include login view is user is not authenticated, or dashboard view if user is logged in.
Or handle that in your dashboard controller.
Or maybe you can use Ajax to load another page without reload
You will want to invoke the controller action of /public/login in the action body of /public/dashboard so that /public/dashboard actually returns the /public/login view.
i.e. (Where showLogin is the name of your controller method)
return $this->showLogin();
Or use iframe, but misleading the user that way is not good in the first place. The address bar should always represent what is shown.
james2037 said:
You will want to invoke the controller action of /public/login in the action body of /public/dashboard so that /public/dashboard actually returns the /public/login view.
i.e. (Where showLogin is the name of your controller method)
return $this->showLogin();
Yeah, thats what i want, just it's located in another controller, is it possible to use something like this?
AuthController@login
The solution for this:
$request = Request::create($uri, 'GET', array());
return Route::dispatch($request)->getContent();
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community