Filament v4 livewire 404Livewire 404 not found already added route into web.php like v3

Hello all. Need urgent help i deployed my project to server . I used filament v4 , facing issue livewire 404 not found . I followed all step which we follow during filament v3. I already added route into web.php where we pass custom folders path to remove this 404 error
28 Replies
Hassan askri
Hassan askriOP2mo ago
@Answer Overflow
Dennis Koch
Dennis Koch2mo ago
- What routes are not found? - And what did you add to web.php? You don't need to add anything for Filament to work. - Do you use shared hosting?
Hassan askri
Hassan askriOP2mo ago
Yes i am using sharing hosting. But in wampp appache in www folder i am direct calling this. Localhost/crm/ this is the path of project.. In filament v3 we use livewire update and get route . Still need to same in v4 ?? When i am going to logged in and i click login button it shows error 404 not found then the path is Localhost/livewre/livewire.js
Dennis Koch
Dennis Koch2mo ago
In filament v3 we use livewire update and get route
I don't know what you mean.
sharing hosting
Shared hosting is always a pain. Can you set the domain root to public/ folder with your shared hosting?
Hassan askri
Hassan askriOP2mo ago
<?php use Illuminate\Support\Facades\Route; // Default home route Route::get('/', function () { return view('welcome'); }); // Fix for Filament / Livewire routes when deployed in a subdirectory Route::get('/livewire/livewire.js', function () { return redirect('/vendor/livewire/livewire.js'); }); Route::get('/livewire/livewire.js.map', function () { return redirect('/vendor/livewire/livewire.js.map'); }); // Optional if you use Filament in a custom prefix (like /admin) Route::prefix('admin')->group(function () { // Filament automatically registers its own routes // You don't have to manually add resources here }); This is the routes we use Wait i am sharing with you my web.php C:\wamp64\www\apnaclinic-crm-portal this is my path where is my project is located this is my web.php use Illuminate\Support\Facades\Route; use Illuminate\Support\Facades\Storage; use App\Http\Controllers\InvoiceController; use Livewire\Livewire; Livewire::setScriptRoute(function ($handle) { return Route::get('apnaclinic-crm-portal/public/livewire/livewire.js', $handle); }); Livewire::setUpdateRoute(function ($handle) { return Route::post('apnaclinic-crm-portal/public/livewire/update', $handle); });
Hassan askri
Hassan askriOP2mo ago
No description
Hassan askri
Hassan askriOP2mo ago
Request URL http://localhost/livewire/update Request Method POST Status Code 404 Not Found Remote Address [::1]:80 Referrer Policy strict-origin-when-cross-origin did u understand ? please solve my issue @Dennis Koch @toeknee @Dan Harrin @Dennis Koch
Dennis Koch
Dennis Koch2mo ago
Do not tag people! #✅┊rules
Hassan askri
Hassan askriOP2mo ago
sorry i am new here need help
Dennis Koch
Dennis Koch2mo ago
Yeah, everybody in here needs help. You are not alone. And everybody is helping in his free time.
Hassan askri
Hassan askriOP2mo ago
ok , so please let me know what mistake i am doing in code , in filament v 3 i resolved this issue by adding the routes
Dennis Koch
Dennis Koch2mo ago
Regarding your question: Your setup looks super hacky. Laravel doesn't work well with subdirectory setups. If your hosting provider doesn't support setting the document root of the app to public/ you will have a hard time.
Hassan askri
Hassan askriOP2mo ago
so is there any solution?? in v3 we resolve it by doing above mentioned solution
Dennis Koch
Dennis Koch2mo ago
I don't know. Maybe. I never had to do any hacks to make Laravel/Livewire/Filament work because I don't use Shared Hosting. So I can't really help
Dan Harrin
Dan Harrin2mo ago
youre trying to patch a livewire issue, not a filament issue and since filament v3 and filament v4 both use livewire 3, i think youre doing something wrong
Dennis Koch
Dennis Koch2mo ago
Btw. since your don't have a document root and use apnaclinic-crm-portal/public your might be vulnerable to exploits of the .env (apnaclinic-crm-portal/.env) file and storage files.
Dan Harrin
Dan Harrin2mo ago
shared hosting is such a bad choice for laravel. its not even really cheaper than a vps nowadays
Dennis Koch
Dennis Koch2mo ago
It's usually never about the price, but the maintenance.
Dan Harrin
Dan Harrin2mo ago
I dont think thats an excuse nowadays, Laravel apps can run fine with minimal maintainence
Dennis Koch
Dennis Koch2mo ago
It's not about the app. It's about the server that you have to maintain. Even if it's usually not much using Ploi/Forge it still is *your responsibility. Shared hosting is not.
Dan Harrin
Dan Harrin2mo ago
Eh, I think that is not a real thing most people consider
Dennis Koch
Dennis Koch2mo ago
What? The maintenance question ? 😅 That's usually the first question in a company: Who is responsible for this.
Dan Harrin
Dan Harrin2mo ago
If a project is small enough to use shared hosting, this should not be a concern When it is a problem, its on larger apps and shared hosting is ruled out anyway
Hassan askri
Hassan askriOP2mo ago
I’m not sure — I’ve shared the entire process that I followed in Filament v3, but those steps aren’t working in Filament v4. If you have a proper deployment method, please let me know.
LeandroFerreira
LeandroFerreira2mo ago
have you tried to publish livewire assets ?
GitHub
Getting "The POST method is not supported for route admin/login. Su...
Package Panel builder Package Version v3.0.0 How can we help you? I&#39;ve recently deployed my Filament application to a server, but I&#39;m encountering an error message stating &#39;The POST met...
Hassan askri
Hassan askriOP2mo ago
Yes i published It is not about hosting i also have VPS but for testing i am doing it.. it is about how anyone can use technology and how many ways of deployment
toeknee
toeknee2mo ago
Shared hosting tends to be the problem because the primary public directory is above the public directory in laravel. So the mod_security setup and any proxy's make it complicated as you need to have a solid understanding of the mod_rewrite or nginx setup. The point is usually you would use a single domain not a sub domain or sub directory. For example, does it work perfect find using Laravel Herd whereby it proxy's and renders under a single domain correctly. Try changing your shared hosting primary directory to the laravel public folder and all your issues will be resolved... IF shared hosting allows, but as all shared hosting can be configured differently, you should ask your host how best to approach it. It is also worth pointing out that deploying in a shared hosting enviroment is generally very slow opposed to a forge/ploi CI/CD approach
TaufikRiontona
Hey Hassan, what laravel version do you use? i have same problem using Filament4, Laravel 12.. Try using Laravel 11.. Here some discussion about it https://github.com/livewire/livewire/discussions/9480
GitHub
Laravel ^12.29 release breaks overriding of livewire/update script ...
Livewire version v3.6.4 Laravel version v12.29 Which PHP version are you using? PHP 8.3 What is the problem? Currently, Laravel always takes the first registration of a route. Because of that, over...

Did you find this page helpful?