How to add a dropdown and access the selected item in base query
I am using seperate schemas in Postgres with tenancyforlaravel.
I want a dropdown to select the tenant, then I can view the table/create/edit etc...
I want to switch to tenant db connection before query basically.
So how to make a dropdown and then access the current tenant in
This is working rn:
I want a dropdown to select the tenant, then I can view the table/create/edit etc...
I want to switch to tenant db connection before query basically.
So how to make a dropdown and then access the current tenant in
getEloquentQuery.This is working rn:
Solution
I fixed it. Forgot to give error message and code.
I override
InitializeTenancyBySubdomain.php
Example only for index
I override
route function in every page like List etc, just add custom middleware that reads tenant param.InitializeTenancyBySubdomain.php
Example only for index