Laravel-reflectionexception in container.php, Class not found?

Source: Internet
Author: User
Tags autoload laravel forge

Sign Upsign in
    • CATALOG
    • SERIES
    • Podcasts
    • Discussions
Reflectionexception in container.php, Class not found?

PUBLISHED 3 years AGO by Kennethjaysone

I ' m not sure why I ' m have this issue in envoyer and not on my local homestead

in Container.php line 736:Class App\Http\Controllers\DashboardController does not exist

My Dasboardcontroller is namespaced:

<?phpNamespaceApp\Http\Controllers;UseView;UseMail;UseSentinel;UseRedirect;UseValidator;UseActivation;UseReminder;UseURL;UseConfig;UseSession;/** * Interfaces to access * *UseAcme\Cars\Carinterface;UseAcme\Media\Mediainterface;UseApp\Http\Requests;Useapp\http\controllers\ controller; use illuminate\Http\request; /** * requests */use App\http\requests\postacarrequest; /** * Class Dashboardcontroller *  @package    app\http\controllers */class dashboardcontroller extends  Authorizedcontroller {}              

My Composer.json is like this:

"autoload": {    "classmap": [        "database"    ],    "psr-4": {        "App\\": "app/" }, "psr-0": { "Acme": "app/" }},"autoload-dev": { "classmap": [ "tests/TestCase.php" ]},

I ' ve followed the steps to upgrading to Laravel 5.1 using this article

http://laravel.com/docs/5.1/upgrade#upgrade-5.1.0

Everything works fine on my machine It's so weird im really don't sure what to do.

Best Answer (as Selected by Kennethjaysone) Mstnorris3 years ago

@kennethjaysone Check your capitalisation!

Class App\Http\Controllers\DashboardController does not exist

Your Controller is calledDashBoardController

class DashBoardController extends AuthorizedController { }

Your Host system (Windows or MAC) is case insensitive by default, and Homestead inherits this behaviour. Your production server On the other hand are case sensitive.

Whenever you get a ClassNotFound Exception check the following:

    1. Spelling
    2. Namespaces
    3. Capitalisation
Mstnorris3 years ago(499,525 XP)

@kennethjaysone Check your capitalisation!

Class App\Http\Controllers\DashboardController does not exist

Your Controller is calledDashBoardController

class DashBoardController extends AuthorizedController { }

Your Host system (Windows or MAC) is case insensitive by default, and Homestead inherits this behaviour. Your production server On the other hand are case sensitive.

Whenever you get a ClassNotFound Exception check the following:

    1. Spelling
    2. Namespaces
    3. Capitalisation
Kennethjaysone3 years ago(15,020 XP)

@mstnorris Thank you. It worked.

MARTHA1 year ago(6,330 XP)

It worked with me after I run "composer Update"

Kiiyaerick10 months ago(10,610 XP)

Worked with me after running composer Dump-autoload.

Participate in or create a account to conversation.

CREATE Account

CHOOSE A FILTER

    • All Threads
    • Popular this Week
    • Popular All time
    • Solved
    • Unsolved
    • No replies Yet
    • Leaderboard

OR PICK A CHANNEL

  • All
  • Code Review
  • Eloquent
  • Envoyer
  • Forge
  • General
  • Guides
  • Javascript
  • Laravel
  • Lumen
  • Mix
  • Requests
  • Servers
  • Site Feedback
  • Spark
  • Testing
  • Tips
  • Vue
404 Error On/loginlaravel? 1 day AGO by Cronixi deployed a brand-new Laravel project to my EC2 server and it shows up fine, if I set up Auth it 404 ' s when trying to view/login. Apache ' s...20Controller not foundlaravel? 2 days AGO by Snapeyhello, I had a problem:my controller Avatarcontroller was not found. His namespace is app\http\controllers\user....20Trouble Installing on Windows 10LARAVEL? 1 day AGO by newbie360i need a "holiday dev computer", so I ' m installing Laravel on a Windows ten laptop. In the past, I has always installed on Linux and it W...18Custom messages in Reset password form don′t showlaravel? 8 HOURS AGO by tobyto change the reset password custom messages I add to the Resetpasswordcontroller 2 methods (rules () an D validationerrormessages ()). However, the C...17Whoops, looks like something went wrong. LARAVEL? 2 Days AGO by cronixhi! Sorry Total noob Here I am wondering what I could does to solve the error:it runs fine locally, so my steps is upload th E...15Laravel Auth with custom error messageslaravel? 1 day AGO by Snapeyi ' m using the-the Laravel Auth but I-would like to has custom error messages: $rules = [' email ' + ' re Quired|email|exists:users...12How to display values in returned from Ajax call in tabular format Laravel? LARAVEL? 2 days AGO by Abdulbazithguys I had a data in table which I displayed in View.blade in tabular format This is the code &L t;thead> <th> <a HRE...12Queued tasks is executing as part of the controller, causing apps to freezelaravel? 1 day AGO by Dagfooyook I ' m new to job queues in Laravel but I ' ve read all the documentation and I thought I understood th Em. My app needs to queue hundreds of J...11User with many relationships, loop within Job Classlaravel? 5 days AGO by Theunforgivenhey all, I had a bunch of users that would all has a tenancy (rental on a property) and is a belongsto re...11Dynamic Drop downlaravel? 1 day AGO by Triheadi has a data base as Follow:companies ID, name contact-> id,name,company_id now I need a Dr OP down list to choose the comp...09

Lots of your peers think Laracasts is one of the best things ever. So buy Jeffrey lunch once a month, see for yourself, and massively level up your skills in the process.

Learn
    • Library
    • Lesson Index
    • Books
    • Sign Up
    • Sign In
Discuss
    • Forum
    • Laracasts Snippet
    • Laravel Podcast
    • Support
EXTRAS
    • Statistics
    • Testimonials
    • FAQ
    • Youtube
    • Get a Job
    • Rss
    • Privacy
    • Terms
? Laracasts 2018. All rights reserved. Yes, all of them. That's means you, todd.proudly hosted with Laravel Forge and Digitalocean.

Laravel-reflectionexception in container.php, Class not found?

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.