skip to Main Content

I downloaded a laravel project online from link
I ran the command is composer update and composer install.
The error i’m seeing is:

In ProviderRepository.php line 208:

Class "CollectiveHtmlHtmlServiceProvider" not found

Script @php artisan package:discover –ansi handling the post-autoload-dump event returned with error code 1

After deleting vendor file and running composer install and composer update im getting this

PHP Fatal error: Declaration of AppProvidersEventServiceProvider::boot(IlluminateContractsEventsDispatcher $events) must be compatible with IlluminateFoundationSupportProvidersEventServiceProvider::boot() in C:xampphtdocsZAlertappProvidersEventServiceProvider.php on line 27
In EventServiceProvider.php line 27:

Declaration of AppProvidersEventServiceProvider::boot(IlluminateContractsEventsDispatcher $events) must be compatible with IlluminateFoundationSupportProvidersEventServiceProvider::boot()

Script @php artisan package:discover –ansi handling the post-autoload-dump event returned with error code 255

I was expecting this to run in laravel 9

2

Answers


  1. Add this line to your service provider php file

    Class"CollectiveHtmlHtmlServiceProvider

    "

    Login or Signup to reply.
  2. It looks like this library missed in your composer.json or you didn’t run composer install
    Please follow the nexts steps:
    1 – require the package in "composer.json" :

    "laravelcollective/html": "~5.0" check the right version for your project 
    

    2 – Run

    composer install 
    

    3 – Add this to config/app.php providers array :

    'CollectiveHtmlHtmlServiceProvider',
    

    4- And this to the aliases array :

     'Form' => 'CollectiveHtmlFormFacade',
     'Html' => 'CollectiveHtmlHtmlFacade',
    

    5- optional step

    composer dump -o 
    

    that should resolve your issue , let me know if you need any help

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search