I just got this project assigned to me, and I am still learning Laravel Framework, however, this app started to show this error message like a week ago, before that it would render the home page and would work, not entirely, but it would render the views. I did not change anything in the code, just tried to sign up as a normal user to test it in the browser like anyone would so it is very confusing to me what is going on… I honestly can´t seem to fully understand the whole structure of this app that someone else was working on before, but I was hoping someone would come and help me out.
I share screenshots of the error and also a link for a detailed view:
https://flareapp.io/share/NPLxQo4P
I have access to the cPanel where the app is hosted, but I just don´t want to change anything just yet. This app is a talent recuitment app, and it was developed by a freelancer programmer who I believe nevere really finished it, however I can confirm it was explorable and was correctly rendering the majority of the views. Now you cant even see a render, the domain just keeps throwing the error for everyone.
I’ve seen the recommendations of composer dumpaoutoload but I am not sure if I should do it.
Also, I saw that in the routes web.php the class is being called like this:
use AppHttpControllersActivitiesSignupController;
However below it is being used like this:
// Route::get('/talentsignup', [signupController::class, 'talentsignup'])->name('talentsignup');
// Route::get('/crewsignup', [signupController::class, 'crewsignup'])->name('crewsignup');
Route::get('/signup', [signupController::class, 'signup'])->name('signup');
Route::get('/submitproject', [ProjectsController::class, 'submitproject'])->name('submitproject');
it differs in the capital "S" of "signupController::class" rather than the "SignupController" in the "use" is that even supposed to mean something? I am so confused.
2
Answers
If the file Models/Signup.php it exists, running
composer dump-autoload
is a good idea, as it just updates the path to the files.Also, check the App directory in the autoload section of composer.json: line
"App\": "app/"
in the"psr-4"
sectionIf you are afraid of making changes on the server, you can try to deploy the project locally (for example, in Docker) and check that everything works before making changes via CPanel.
Can you verify you have correct namespace in model?