Filament Laravel with front React

I have the following setup: • Domain:
domain.com.br
domain.com.br
• My Filament admin is running at
domain.com.br/­­­_/
domain.com.br/­­­_/
• My Laravel API is located at
domain.com.br/_/api/v1
domain.com.br/_/api/v1
• My frontend is at
domain.com.br
domain.com.br
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:
Uncaught (in promise) SyntaxError: Unexpected token '<', "<!doctype "... is not valid JSON
Uncaught (in promise) SyntaxError: Unexpected token '<', "<!doctype "... is not valid JSON
2 Replies
AdalbertoHofmann
AdalbertoHofmannOP3w ago
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
Want results from more Discord servers?
Add your server