Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

558
Views
Target class controller does not exist - laravel 7

My Ajax:

$('#upload').change(function () {
    const form = new FormData();
    form.append('file', $(this)[0].files[0]);
    var url = '/admin/upload/services';

    $.ajax({
        processData: false,
        contentType: false,
        type: 'POST',
        dataType: 'JSON',
        data: form,
        url: url,
        success: function (result) {
            console.log(result);
        },
        error: function(){
            alert('error!');
          }
    });
});

My Route: My Route

My Controller: My Controller

My UploadService: My UploadService

My error: My error

over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

"message": Target class controller [App\\Http\\Controllers\\UploadController] does not exist.",

It appears Laravel is failing to find your Controller. Try clearing complied files and let composer try to auto-discover relevant classes.

In your terminal run these two commands one after the other.

php artisan clear-compiled 
composer dump-autoload
over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!