Hello guys,
Will you please do a sanity check for me on the below approach.
In essence, I have a 3 step form, I want to direct the user back to the relevant step if they abandoned it and logged in again later.
Is there a way to see what this SQL query looks like in the backend, I like the simplicity, but I suspect this loads the entire business object
/*
* On each login check if a business profile is complete, if not redirect the user to the step to complete (will use a switch case)
*/
if(!$user->business->website) {
return redirect('/step-to-complete');
}
What I actually just want is
SELECT column FROM table WHERE user_id = :user_id
That is a small and lightweight query to run when a user logs in, but I do not know if the laravel way actually ends up like that or if its loading everything (or worse, loading a collection of businesses into memory and then filter them)
Note: if the above is not information for you, let me know and I will elaborate as needed.