简体   繁体   English

Laravel错误:未捕获的ReflectionException:类App \\ Http \\ Kernel不存在

[英]Laravel Error : Uncaught ReflectionException: Class App\Http\Kernel does not exist

I don't know what I have done with my Laravel 5.3 Project but I have this error : 我不知道我对Laravel 5.3 Project做了什么,但是有这个错误:

Fatal error: Uncaught ReflectionException: Class App\\Http\\Kernel does not exist in C:\\laragon\\www\\BookTime\\vendor\\laravel\\framework\\src\\Illuminate\\Container\\Container.php:729 Stack trace: #0 C:\\laragon\\www\\BookTime\\vendor\\laravel\\framework\\src\\Illuminate\\Container\\Container.php(729): ReflectionClass->__construct('App\\Http\\Kernel') #1 C:\\laragon\\www\\BookTime\\vendor\\laravel\\framework\\src\\Illuminate\\Container\\Container.php(608): Illuminate\\Container\\Container->build('App\\Http\\Kernel') #2 C:\\laragon\\www\\BookTime\\vendor\\laravel\\framework\\src\\Illuminate\\Container\\Container.php(564): Illuminate\\Container\\Container->resolve('App\\Http\\Kernel', Array) #3 C:\\laragon\\www\\BookTime\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Application.php(709): Illuminate\\Container\\Container->makeWith('App\\Http\\Kernel', Array) 4 C:\\laragon\\www\\BookTime\\vendor\\laravel\\framework\\src\\Illuminate\\Container\\Container.php(248): Illuminate\\Foundation\\Application->makeWith('App\\Http\\Kernel', Array) #5 C:\\laragon\\www 致命错误:未捕获的ReflectionException:C:\\ laragon \\ www \\ BookTime \\ vendor \\ laravel \\ framework \\ src \\ Illuminate \\ Container \\ Container.php:729中不存在类App \\ Http \\ Kernel:堆栈跟踪:#0 C:\\ laragon \\ www \\ BookTime \\ vendor \\ laravel \\ framework \\ src \\ Illuminate \\ Container \\ Container.php(729):ReflectionClass-> __ construct('App \\ Http \\ Kernel')#1 C:\\ laragon \\ www \\ BookTime \\ vendor \\ laravel \\ framework \\ src \\ Illuminate \\ Container \\ Container.php(608):Illuminate \\ Container \\ Container-> build('App \\ Http \\ Kernel')#2 C:\\ laragon \\ www \\ BookTime \\ vendor \\ laravel \\ framework \\ src \\ Illuminate \\ Container \\ Container.php(564):Illuminate \\ Container \\ Container-> resolve('App \\ Http \\ Kernel',Array)#3 C:\\ laragon \\ www \\ BookTime \\ vendor \\ laravel \\ framework \\ src \\ Illuminate \\ Foundation \\ Application.php(709):Illuminate \\ Container \\ Container-> makeWith('App \\ Http \\ Kernel',Array)4 C:\\ laragon \\ www \\ BookTime \\ vendor \\ laravel \\ framework \\ src \\ Illuminate \\ Container \\ Container.php(248):Illuminate \\ Foundation \\ Application-> makeWith('App \\ Http \\ Kernel',Array)#5 C:\\ laragon \\ www \\BookTime\\vendor\\laravel\\f in C:\\laragon\\www\\BookTime\\vendor\\laravel\\framework\\src\\Illuminate\\Container\\Container.php on line 729 729行上的C:\\ laragon \\ www \\ BookTime \\ vendor \\ laravel \\ framework \\ src \\ Illuminate \\ Container \\ Container.php中的\\ BookTime \\ vendor \\ laravel \\ f

OS : Windows 10 Localhost : Laragon PHP Version : 5.6.4 操作系统:Windows 10 Localhost:Laragon PHP版本:5.6.4

That's my package.json 那就是我的package.json

   {  "name": "laravel/laravel",
  "description": "The Laravel Framework.",
  "keywords": ["framework", "laravel"],
  "license": "MIT",
  "type": "project",
  "require": {
    "php": ">=5.6.4",
    "laravel/framework": "5.3.*"
  },
  "require-dev": {
    "fzaninotto/faker": "~1.4",
    "mockery/mockery": "0.9.*",
    "phpunit/phpunit": "~5.0",
    "symfony/css-selector": "3.1.*",
    "symfony/dom-crawler": "3.1.*"
  },
  "autoload": {
    "classmap": [
      "database"
    ],
    "psr-4": {
      "App\\": "app/"
    }
  },
  "autoload-dev": {
    "classmap": [
      "tests/TestCase.php"
    ]
  },
  "scripts": {
    "post-root-package-install": [
      "php -r \"file_exists('.env') || copy('.env.example', '.env');\""
    ],
    "post-create-project-cmd": [
      "php artisan key:generate"
    ],
    "post-install-cmd": [
      "Illuminate\\Foundation\\ComposerScripts::postInstall",
      "php artisan optimize"
    ],
    "post-update-cmd": [
      "Illuminate\\Foundation\\ComposerScripts::postUpdate",
      "php artisan optimize"
    ]
  },
  "config": {
    "preferred-install": "dist",
    "sort-packages": true
  }
}

My providers in app.php 我在app.php中的提供者

[ [

        /*
         * Laravel Framework Service Providers...
         */
        Collective\Html\HtmlServiceProvider::class,
        Barryvdh\Debugbar\ServiceProvider::class,
        Illuminate\Auth\AuthServiceProvider::class,
        Illuminate\Broadcasting\BroadcastServiceProvider::class,
        Illuminate\Bus\BusServiceProvider::class,
        Illuminate\Cache\CacheServiceProvider::class,
        Illuminate\Foundation\Providers\ConsoleSupportServiceProvider::class,
        Illuminate\Cookie\CookieServiceProvider::class,
        Illuminate\Database\DatabaseServiceProvider::class,
        Illuminate\Encryption\EncryptionServiceProvider::class,
        Illuminate\Filesystem\FilesystemServiceProvider::class,
        Illuminate\Foundation\Providers\FoundationServiceProvider::class,
        Illuminate\Hashing\HashServiceProvider::class,
        Illuminate\Mail\MailServiceProvider::class,
        Illuminate\Notifications\NotificationServiceProvider::class,
        Illuminate\Pagination\PaginationServiceProvider::class,
        Illuminate\Pipeline\PipelineServiceProvider::class,
        Illuminate\Queue\QueueServiceProvider::class,
        Illuminate\Redis\RedisServiceProvider::class,
        Illuminate\Auth\Passwords\PasswordResetServiceProvider::class,
        Illuminate\Session\SessionServiceProvider::class,
        Illuminate\Translation\TranslationServiceProvider::class,
        Illuminate\Validation\ValidationServiceProvider::class,
        Illuminate\View\ViewServiceProvider::class,

        /*
         * Package Service Providers...
         */
        Laravel\Tinker\TinkerServiceProvider::class,

        /*
         * Application Service Providers...
         */
        App\Providers\AppServiceProvider::class,
        App\Providers\AuthServiceProvider::class,
        // App\Providers\BroadcastServiceProvider::class,
        App\Providers\EventServiceProvider::class,
        App\Providers\RouteServiceProvider::class,

    ],

    /*
    |--------------------------------------------------------------------------
    | Class Aliases
    |--------------------------------------------------------------------------
    |
    | This array of class aliases will be registered when this application
    | is started. However, feel free to register as many as you wish as
    | the aliases are "lazy" loaded so they don't hinder performance.
    |
    */

    'aliases' => [
        'Form' => Collective\Html\FormFacade::class,
        'Debugbar' => Barryvdh\Debugbar\Facade::class,
        'Html' => Collective\Html\HtmlFacade::class,
        'App' => Illuminate\Support\Facades\App::class,
        'Artisan' => Illuminate\Support\Facades\Artisan::class,
        'Auth' => Illuminate\Support\Facades\Auth::class,
        'Blade' => Illuminate\Support\Facades\Blade::class,
        'Broadcast' => Illuminate\Support\Facades\Broadcast::class,
        'Bus' => Illuminate\Support\Facades\Bus::class,
        'Cache' => Illuminate\Support\Facades\Cache::class,
        'Config' => Illuminate\Support\Facades\Config::class,
        'Cookie' => Illuminate\Support\Facades\Cookie::class,
        'Crypt' => Illuminate\Support\Facades\Crypt::class,
        'DB' => Illuminate\Support\Facades\DB::class,
        'Eloquent' => Illuminate\Database\Eloquent\Model::class,
        'Event' => Illuminate\Support\Facades\Event::class,
        'File' => Illuminate\Support\Facades\File::class,
        'Gate' => Illuminate\Support\Facades\Gate::class,
        'Hash' => Illuminate\Support\Facades\Hash::class,
        'Lang' => Illuminate\Support\Facades\Lang::class,
        'Log' => Illuminate\Support\Facades\Log::class,
        'Mail' => Illuminate\Support\Facades\Mail::class,
        'Notification' => Illuminate\Support\Facades\Notification::class,
        'Password' => Illuminate\Support\Facades\Password::class,
        'Queue' => Illuminate\Support\Facades\Queue::class,
        'Redirect' => Illuminate\Support\Facades\Redirect::class,
        'Redis' => Illuminate\Support\Facades\Redis::class,
        'Request' => Illuminate\Support\Facades\Request::class,
        'Response' => Illuminate\Support\Facades\Response::class,
        'Route' => Illuminate\Support\Facades\Route::class,
        'Schema' => Illuminate\Support\Facades\Schema::class,
        'Session' => Illuminate\Support\Facades\Session::class,
        'Storage' => Illuminate\Support\Facades\Storage::class,
        'URL' => Illuminate\Support\Facades\URL::class,
        'Validator' => Illuminate\Support\Facades\Validator::class,
        'View' => Illuminate\Support\Facades\View::class,

    ],

How can I resolve this problem please ? 请问该如何解决?

This is normally solved by doing this: 通常可以通过执行以下操作解决此问题:

php artisan config:clear
php artisan cache:clear
composer dump-autoload 

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Laravel:致命错误:未捕获反射异常:Class App\Http\Kernel 不存在 - Laravel : Fatal error: Uncaught ReflectionException: Class App\Http\Kernel does not exist Laravel错误未捕获异常'ReflectionException',消息'Class App \ Http \ Kernel不存在' - Laravel error Uncaught exception 'ReflectionException' with message 'Class App\Http\Kernel does not exist' Laravel 错误 'ReflectionException' - 'Class App\\Http\\Kernel 不存在' - Laravel error 'ReflectionException' - 'Class App\Http\Kernel does not exist' 未捕获的ReflectionException:在/project/vendor/laravel/framework/src/Illuminate/Container/Container.php:721中不存在App \\ Http \\ Kernel类 - Uncaught ReflectionException: Class App\Http\Kernel does not exist in /project/vendor/laravel/framework/src/Illuminate/Container/Container.php:721 未捕获的异常 'ReflectionException' 带有消息 'Class App\\Console\\Kernel does not exist' - Uncaught exception 'ReflectionException' with message 'Class App\Console\Kernel does not exist' Laravel-未捕获的ReflectionException:类日志不存在-配置错误 - Laravel - Uncaught ReflectionException: Class log does not exist - Config error ReflectionException类App \\ Http \\ Controllers \\ ContactController不存在Laravel 5.2 - ReflectionException Class App\Http\Controllers\ContactController does not exist Laravel 5.2 ReflectionException类App \\ Http \\ Controllers \\ AdminBookingsController不存在Laravel-5 - ReflectionException Class App\Http\Controllers\AdminBookingsController does not exist Laravel-5 Laravel: ReflectionException - Class App\\Http\\Controllers\\XXXX 不存在 - Laravel: ReflectionException - Class App\Http\Controllers\XXXX does not exist Laravel:ReflectionException Class App\Http\Controllers\DashboardController 不存在 - Laravel : ReflectionException Class App\Http\Controllers\DashboardController does not exist
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM