简体   繁体   中英

Class 'Laraveldaily\Quickadmin\QuickadminServiceProvider' not found for php artisan in Laravel

I want to install quickadmin to create a quick admin panel, I am using Laravel 5.3 and I have followed the step to install:

  1. Create new project

    composer create-project laravel/laravel ProjectName --prefer-dist

2.Install quickadmin

composer require laraveldaily/quickadmin

  1. Add Laraveldaily\\Quickadmin\\QuickadminServiceProvider::class, to your \\config\\app.php providers after App\\Providers\\RouteServiceProvider::class,

  2. Configure your .env file with correct database information

  3. Run php artisan quickadmin:install and fill the required information.

but this error appear

[Symfony\Component\Debug\Exception\FatalThrowableError]              
  Class 'Laraveldaily\Quickadmin\QuickadminServiceProvider' not found  

What's happend?

I think you left one step and that is clear the cache. Please try after clear the cache.

You can run following command after 3rd step :

php artisan config:cache
php artisan config:clear
php artisan cache:clear

These steps can be followed to install quickadminpanel without any difficulty

  1. composer create-project laravel/laravel ProjectName --prefer-dist

  2. cd ProjectName

  3. php artisan clear-compiled

  4. composer require laraveldaily/quickadmin

  5. php artisan clear-compiled

  6. Open:

    config/app.php

    insert in the $providers array after Illuminate\\View\\ViewServiceProvider::class,

     Laraveldaily\\Quickadmin\\QuickadminServiceProvider::class, 
  7. Open:

    config/app.php

    insert

     Laraveldaily\\Quickadmin\\QuickadminServiceProvider::class, 
  8. Open:

    app/Providers/AppServiceProvider.php

    insert after use Illuminate\\Support\\ServiceProvider;

     use Illuminate\\Support\\Facades\\Schema; 

    insert in boot() function

      Schema::defaultStringLength(191); 
  9. Create a database(if you are using something like xampp, create it in phpmyadmin)

  10. Modify .env file to add database configurations, db name(the one which you created), username(usually root), password

  11. php artisan config:cache

  12. php artisan config:clear

  13. php artisan quickadmin:install

  14. enter admin email and password (will be used to login to quickadminpanel everytime, so choose ones you can easily remember)

  15. Open:

    App\\Http\\Kernel.php

    insert in the $routeMiddleware array

     'role' => \\Laraveldaily\\Quickadmin\\Middleware\\HasPermissions::class, 
  16. php artisan serve

  17. Open browser, url: localhost:8000/admin

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM