controller - laravel 5.2 user login redirect with condition -


i making dating website using laravel 5.2

i have tables in database

--user

--profile

--education

--occupation

--marital status

--parents details

each of table has user_id forigen key of user table.

all models have been created , hasmany , belongsto relation has been added respectively.

my question when user login, user land specific create controller if table unfilled or form not filled. ex- profile.create, education.create , occupation.create.

or there efficient way can handle situation.

thanks in advance, hope got it. let me know if still need more info.

the simple idea below:

  • create column full_profile (tinyint, length 1) in table indicates profile full. default it's 0.
  • after validations true, set value of full_profile 1.

ok, it's simple:

  • user logs in
  • check value of full_profile. if 0, redirect form, if 1, redirect dashboard?

Comments

Popular posts from this blog

javascript - jQuery: Add class depending on URL in the best way -

caching - How to check if a url path exists in the service worker cache -

Redirect to a HTTPS version using .htaccess -