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
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');
}
}
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.