thedevdojo / voyager

Voyager - The Missing Laravel Admin
https://voyager.devdojo.com
MIT License
11.72k stars 2.67k forks source link

custom action not found on cpanel #5837

Open zia-khan-dev opened 5 months ago

zia-khan-dev commented 5 months ago

Laravel version

8.75

PHP version

8

Voyager version

1.6

Database

mysql

Description

I've added a custom action button to my laravel project, locally it is fine, but on cpanel it give me an error that "Class 'App\Actions\MyAction' not found"

Steps to reproduce

Create a custom action add to service provider

Expected behavior

The custom action should work on cpanel as locally its working fine

Screenshots

image

Additional context

No response

Emerica commented 5 months ago

Verify the file exists and hasn't been corrupted, maybe just an upload/transfer issue.

Is there any typo or case miss-match issues with your class name within the file itself, different environments might be more sensitive.

I think most of mine end up in AppServiceProvider like, I don't bother with a use.

        Voyager::addAction(\App\Actions\MyAction::class);