getting error “Class 'Illuminate\Foundation\Ap

2019-08-07 04:07发布

First of all..sorry for my bad english.

I installed a fresh copy of laravel 5 on my localhost and configured its database.php and .env file. it was running well.

After that i added (as stated here https://laravelcollective.com/docs/5.1/html)

    "require": {
    "laravelcollective/html": "5.1.*"
}

in my composer.json And. updated Composer from the Terminal:

composer update

Next, When i am running my page, it gives following fatal error:

Fatal error: Class 'Illuminate\Foundation\Application' not found in C:\xampp\htdocs\TodoApp\bootstrap\app.php on line 14

标签: laravel-5.1
3条回答
forever°为你锁心
2楼-- · 2019-08-07 04:50
   php artisan clear-compiled
    composer dump-autoload
查看更多
Bombasti
3楼-- · 2019-08-07 04:52

I guess you shall follow this way to include your html helper

"require": {
    "laravelcollective/html": "5.1"
}

and do

composer update

then change inside your config/app.php

I recommend you to follow this according to your laravel version

Note :

Don't edit your autoload like this

查看更多
We Are One
4楼-- · 2019-08-07 05:01

Your composer file is probably messed up.

Run composer update --no-scripts

查看更多
登录 后发表回答