mercredi 27 juin 2018

Laravel 5.4 Spatie blade issue after deploying (probably a cache issue)

I have 02 env:

  1. local
  2. prod

Both have :

  • the same data, permission-role-user tables are populated by seeds
  • the same branch, and same version (git log returns the same last commit)

In fact, I tried to deploy last features which use new permissions and affect blade rendering. Below what I have in blade:

@can('manage_user’)

@endcan
@can('d_xxx’)

@endcan
@can('manage_manage_xxxx’)

@endcan

Locally, I have no issue

enter image description here

But in prod, Spatie seems ignoring existing permissions :(

enter image description here

I already tried those solution but without result:

  • php artisan config:clear
  • php artisan config:cache
  • php artisan view:clear
  • php artisan cache:forget spatie.permission.cache
  • restart the server

Has anyone faced this kind of issue, and what was the solution?



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire