Asfaq Tamim
Asfaq Tamim

Reputation: 5697

How to add service provider into config/app providers array in laravel 5.1

I have installed these packages shown in the image:

enter image description here

and add these lines in providers array

enter image description here

but when I run this command got this error !!

enter image description here

Does there any changes happen in laravel 5.1 for adding packages service ??

I followed the instructions mentioned in the github repo. but got the same error.

Upvotes: 1

Views: 3913

Answers (2)

aMighty
aMighty

Reputation: 283

https://laravel.com/docs/master/providers

just go through this documentation. Suppose: I need to do this:- Add the ServiceProvider of the package to the list of providers in the config/app.php file

'providers' => array( 'Serverfireteam\Blog\BlogServiceProvider' )

then, i would do this in

'providers' => [

    /*
    *Added by Amit for the blog
    */
    Serverfireteam\Blog\BlogServiceProvider::class,

    /*
     * Laravel Framework Service Providers...
     */

Upvotes: 1

Limon Monte
Limon Monte

Reputation: 54449

Follow the documentation. It says that first of all you should add wemersonjanuario/laravelpdf to composer.json:

{
  "require": {            
    "wemersonjanuario/laravelpdf": "1.0.*"
  }
}

This can be done by running:

composer require wemersonjanuario/laravelpdf

Upvotes: 0

Related Questions