public function saving(Eloquent $model): void
    {
        $keyword = Keyword::make($model->getAttribute('name'));

        if ($keyword->searchIn(['guest']) !== false) {
            throw new InvalidArgumentException("Role [{$keyword->getValue()}] is not allowed to be used!");
        }
    }
public function saving(Eloquent $model): void
    {
        $keyword = Keyword::make($model->getAttribute('name'));

        if ($keyword->searchIn(['guest']) !== false) {
            throw new InvalidArgumentException("Role [{$keyword->getValue()}] is not allowed to be used!");
        }
    }
public function saving ( Eloquent $ model ) : void { $ keyword = Keyword :: make ( $ model -> getAttribute ( 'name' ) ) ; if ( $ keyword -> searchIn ( [ 'guest' ] ) !== false ) { throw new InvalidArgumentException ( "Role [{$keyword->getValue()}] is not allowed to be used!" ) ; } }
On saving observer.

@param  \Orchestra\Model\Role  $model

@return void
On saving observer .