I want forcefully switch layout of my website on login and logout if the current domain is tenant domain. Anyone have any idea about this. Using framework Laravel 8
Just check if a tenant is currently identified (see docs for how to do so) in your view to determine which layout to use. Here's some rough pseudo code:
@if(isset($tenant)) @extends('layout1') @else @extends('layout2') @endif
fletch3555 could you please share in which file I need to add this code
ahaladh You need to add that code in your layouts file/files.
How can I get if logged in user is tenant user or not?
ahaladh that's dependant on which package you're using (hyn/multi-tenant vs tenancy framework), which is why I left it off the example I posted above. In either case, I believe the docs should be able to answer your question.