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 "Collective\Html\HtmlServiceProvider" 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 App\Providers\EventServiceProvider::boot(Illuminate\Contracts\Events\Dispatcher $events) must be compatible with Illuminate\Foundation\Support\Providers\EventServiceProvider::boot() in C:\xampp\htdocs\ZAlert\app\Providers\EventServiceProvider.php on line 27 In EventServiceProvider.php line 27:
Declaration of App\Providers\EventServiceProvider::boot(Illuminate\Contracts\Events\Dispatcher $events) must be compatible with Illuminate\Foundation\Support\Providers\EventServiceProvider::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
CodePudding user response:
Add this line to your service provider php file
Class"Collective\Html\HtmlServiceProvider
"
CodePudding user response:
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 :
'Collective\Html\HtmlServiceProvider',
4- And this to the aliases array :
'Form' => 'Collective\Html\FormFacade',
'Html' => 'Collective\Html\HtmlFacade',
5- optional step
composer dump -o
that should resolve your issue , let me know if you need any help