Home Ask Login Register

Developers Planet

Your answer is one click away!

sanainfotech February 2016

laravel 5.2 user login redirect with condition

I am making Dating website using laravel 5.2

I have Tables in database





--Marital Status

--Parents Details

Each of the table has user_id as forigen key of User table.

All models have been created and hasMany and belongsTo relation has been added respectively.

My question is when user login, I would like user to land to specific create controller if table is unfilled or form is not filled. For EX- profile.create, education.create , occupation.create.

Or is there any efficient way I can handle this situation.

Thanks in advance, I hope you got it. Let me know if you still need any more info.


schellingerht February 2016

The most simple idea below:

  • Create a column full_profile (tinyint, length 1) in your table which indicates the profile is full. Default it's 0.
  • After a validations are true, set the value of the full_profile to 1.

Ok, now it's simple:

  • User logs in
  • Check the value of full_profile. If 0, redirect to form, if 1, redirect to dashboard?

Post Status

Asked in February 2016
Viewed 1,033 times
Voted 9
Answered 1 times


Leave an answer

Quote of the day: live life