AgonK
how to use SaaS with filament and multiple databases ?
I have a SaaS API and now I'm implementing filament for the front end part. I don't have any experience with filament and I'm having some trouble at this point and I'm trying to tell you my problem
I have a master database wich is default (in .env) and when user submit the login form on filament I get this credentials and find the corresponding database and reconnect it. To make this possible I've override the authenticate function from filament.
My excpectation will be from this point everything should work like single database like eloquent queries until next login.
But after login in some other function the database stay the same as default database. I think the database doesn't change globally. Is there any solution about that, or I miss something here ?
3 replies
how to send request and get response inside action button
Im trying to send get/post request inside action ( button in header section). I tried with route and Http::post(route(name,params) but nothing works. How can I send request and get response, and based on response show the notification
26 replies
how to integrate existing APIs with filament
I have existing API app that I use for mobile applications. I want to integrate filament for some pretty views, but I want to integrate filament (create,update,list) with my existing API and not to default filament CRUD operation directly with eloquent models. For example I want to send submit form to my API p.s
Route::post('/teachers', [TeacherController::class, 'store']);
and edit to
Route::put('/teachers/{id}', [TeacherController::class, 'update']);
is it possible ? if Yes how can I do it, because Im not familiar with filament.
21 replies