mardi 8 novembre 2016

Laravel 5: 'Invalid argument supplied for foreach' after creating Service Provider

I've already sort of found an alternative way to do this, but i would really like to know why after creating a service provider i get this error:

ErrorException in ProviderRepository.php line 120: Invalid argument supplied for foreach()

These are the steps i followed to create a service provider:

1-php artisan make:provider UserServiceProvider

2-adding 'App\Providers\UserServiceProvider::class' to the providers Array in config/app.php

am i missing something?

the alternative way i used to resolve this was registering all my services in app/Providers/AppServiceProvider.php



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire