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's0
. - after validations
true
, set value offull_profile
1
.
ok, it's simple:
- user logs in
- check value of
full_profile
. if0
, redirect form, if1
, redirect dashboard?
Comments
Post a Comment