Filament Laravel with front React
I have the following setup:
• Domain:
• My Filament admin is running at
• My Laravel API is located at
• My frontend is at
VPS directory structure (root):
• backend (Laravel)
• public_html (contains index.html for React and a symbolic link, "underscore": pointing to backend/public)The issue: When I submit the login form(filament login), the system returns an error related to the index.html file from public_html:
2 Replies
heres the solution
by adding: APP_ASSETSURL="" at .env and on my web.php
Livewire::setScriptRoute(function($handle) {
return Route::get(config('app.assetsUrl') . '/livewire/livewire.js', $handle);
});
Livewire::setUpdateRoute(function($handle) {
return Route::get(config('app.assetsUrl') . '/livewire/update', $handle);
});
this creates
GET|HEAD _/livewire/livewire.js ............ Livewire\Mechanisms › FrontendAssets@returnJavaScriptAsFile
GET|HEAD _/livewire/update ............ livewire.update › Livewire\Mechanisms › HandleRequests@handleUpdate
here a link with the same problem
https://laracasts.com/discuss/channels/filament/filament-in-subdirectory