Laravel-permission: Receiving error while performing any action in laravel

Created on 29 Jun 2018  路  1Comment  路  Source: spatie/laravel-permission

I'm receiving an error saying

In ProviderRepository.php line 208:
Class 'Spatie\Permission\PermissionServiceProvider' not found  

I have included Spatie\Permission\PermissionServiceProvider::class, in the provider array.

After doing composer update I've started receiving this error

support

Most helpful comment

The Class not found message is mostly self explanatory: it can't find the class ... presumably because the composer autoloader doesn't have it indexed ... which usually means it's not installed locally.

You said this happened "after doing composer update". What version of this package did you have before the update? What version does it have now? Did you remove this package from your composer.json file? Do you have a syntax error in your composer.json, that's causing things not to load?
I can't think of anything "specific to this package" that would be causing any of your symptoms. Possible troubleshooting might include running composer update, or composer show or composer outdated.

I've seen one scenario where a cloned package (not the original package) will sometimes get "removed" by composer during a composer update, and simply running composer update again will resolve it. It's rare, but I offer it as a possible troubleshooting step.

>All comments

The Class not found message is mostly self explanatory: it can't find the class ... presumably because the composer autoloader doesn't have it indexed ... which usually means it's not installed locally.

You said this happened "after doing composer update". What version of this package did you have before the update? What version does it have now? Did you remove this package from your composer.json file? Do you have a syntax error in your composer.json, that's causing things not to load?
I can't think of anything "specific to this package" that would be causing any of your symptoms. Possible troubleshooting might include running composer update, or composer show or composer outdated.

I've seen one scenario where a cloned package (not the original package) will sometimes get "removed" by composer during a composer update, and simply running composer update again will resolve it. It's rare, but I offer it as a possible troubleshooting step.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

vpratfr picture vpratfr  路  4Comments

Dreambox13 picture Dreambox13  路  3Comments

holymp2006 picture holymp2006  路  4Comments

younus93 picture younus93  路  4Comments

feliperoan picture feliperoan  路  3Comments