My client's website is www.sweetfood.com, and there is a button that redirects to my application www. orderfood.com for online food ordering.
While redirecting I am passing the company code as a parameter like
www.orderfood.com/{company_code}
and saving it on the session for further use. But if the session is expired company_code is null, so that I can not return it to the client's website. since I don't have company_code.
Is it better to use config() for saving the value, or any other ways
@anand_aks you can prefix all of your route with following pattern www.orderfood.com/c/{company_code}/ in this way you will have company_code in all the routes and request.
In any case if you can keep prefix then you can use company_code as request parameter like this www.orderfood.com/your-awsome-route?company_code=1234 And once again you will have company_code in all your routes the only catch with this approach is, then you will have to make sure you are handling the empty value for the param company_code