DEV Community

Discussion on: Simple user roles in Laravel

Collapse
 
stephenmorton profile image
Stephen Morton

Hi Martin, great article. I am trying to make this work with Laravel 8. I think there have been changes to the way arrays work. I wish to send a few roles through the route middleware per your example, but only the first is being received. Ie, if i send ->name('test.roles')->middleware('roles:admin'); it works fine, but if I send ->name('test.roles')->middleware('roles:manager,admin'); only manager is received. Any ideas? Thanks in advance. Steve