Separate APIs from Filament

Hello everyone, I was wondering if I can deploy my APIs without Filament and create another deployment for Filament only. In simpler terms, we have 1 code base that serves both APIs and Filament where they share the same models. I would like to achieve admin.mywebsite.com and api.website.com subdomains with the same code base but with smaller bundle to make sure my service providers doesn't (Laravel's and Filament's) doesn't affect the application boot.
2 Replies
Dennis Koch
Dennis Koch2mo ago
I guess you could remove the providers during deployment so only selected ones are booted.
awcodes
awcodes2mo ago
Technically, there’s no reason you couldn’t do api.website.com as a separate app. Honestly, though, I don’t think you’ll see much difference with or without filament getting booted too. Can also implement route caching for the api responses that would help too.

Did you find this page helpful?