jeudi 11 octobre 2018

Redirected to another page while accessing home page

When user registers in the app, the app is showing a user detail form to complete the profile instead of Dashboard(homepage). Only after the completion of the User profile, user can see the Dashboard.

After registration we are setting a session variable:

\Session::put('profile_summary_flag',1);

I wanted to skip this user profile form.

Below is the controller detail:

Route::get('/home', 'HomeController@index')->name('home');

When I am trying to access Dashboard, I am automatically redirects to profile detail form.

I tried to add debugger dd('hello') in the HomeController -> index method but redirected to profile detail form, this proves that logic for redirection to another page is defined somewhere else.

I want to know in Laravel from where we can redirect a page on certain condition.



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire