Jbaltazar67 Posted November 9, 2021 Report Share Posted November 9, 2021 Hello, I have a little problem with the deleted old expenses that remain in the drop-down menu. I have created an expense in the Listener file, but the Lavarel log tells me that it does not Cannot declare class App\Listeners\LandingRate_ChargePilot, because the name is already in use {"userId":6,"exception":"[object] (Symfony\\Component\\ErrorHandler\\Error\\FatalError(code: 0): Cannot declare class App\\Listeners\\LandingRate_ChargePilot, because the name is already in use at /home/jacquesm/phpvms/app/Listeners/ExpenseListener.php:0). Is there a file to modify somewhere ? or to delete ? Sorry but the site does not take my screen shot Quote Link to comment Share on other sites More sharing options...
DisposableHero Posted November 10, 2021 Report Share Posted November 10, 2021 (edited) This error usually pops up when the filename and the inner class name declaration does not match. It sounds weird but try using the same name like Filename : LandingRateChargePilot.php In the file : class LandingRateChargePilot extends Listener And if something is causing problems even afrer deleting the file, it is probably because of the cache. Visit admin/maintenance and clean cache, if not able then you need to manually delete the application cache from It is located at ./bootstrap/cache folder, do NOT delete the folder, delete the files inside it Hope it helps Edited November 10, 2021 by DisposableHero Quote Link to comment Share on other sites More sharing options...
Skytraveler Posted May 22, 2023 Report Share Posted May 22, 2023 @Jbaltazar67 Hi, did you (or someone?) managed to put this to work? I have exactly the same problem (filename and inner class name declaration do match and I cleaned cache too) Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.