Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Invalid route action: [App\Http\Livewire\trips\Active]

The project is running well on local machine but when updating it on centos server, it gives the error Invalid route action: [App\Http\Livewire\trips\Active]. the rest of the routes are working fine apart from the ones on in the subfolders trips.

See the image enter image description here

Here is my web.php

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

Route::get('/active',\App\Http\Livewire\trips\Active::class)->name('active');

Here is the controller

class Active extends Component
{

public function render()
{
    return view('livewire.trips.active');
}

}

>Solution :

Your problem might be the trip part.

Try to change:
Route::get('/active',\App\Http\Livewire\trips\Active::class)->name('active');

To:
Route::get('/active',\App\Http\Livewire\Trips\Active::class)->name('active');

Base on image you’ve attached, you had Trips with Uppercase T.

Don’t forget to also check, class namespace, I’m telling this, because you’re using PHPStorm, and this IDE add imports base on namespace as far as i know.

In term of developing, when developing at local, you’re basically might not see anything wrong (in most cases, Windows or Mac), but as you said, uploading to server with different OS might act in other ways (Specially linux OS), and case-sensitive is something that is always might considered.

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading