laravel-acl icon indicating copy to clipboard operation
laravel-acl copied to clipboard

There is a key like 'is_not' for routes? (inverse of 'is')

Open nelson6e65 opened this issue 7 years ago • 2 comments

There is a way to "allow from all, except this"?

I mean, without the need of adding all else roles to 'is' key.

Or 'not' operator:

<?php

$user->is('moderator', 'not');
$user->is('!moderator');

<?php
Route::get('/dashboard', [
    'uses'       => 'DashboardController@index',
    'middleware' => ['auth', 'acl'],
    'is'         => '!moderator',
]);

nelson6e65 avatar Aug 12 '16 15:08 nelson6e65

@nelson6e65 right now its not possible but easier to add. I'll add this feature in next version.

kodeine avatar Sep 19 '16 19:09 kodeine

:ghost:

nelson6e65 avatar Jul 14 '18 21:07 nelson6e65