public function getSearchableRules(): array
    {
        return [
            'roles:[]' => function (Builder $query, array $roles) {
                return $query->whereHas('roles', function (Builder $query) use ($roles) {
                    return $query->whereIn(Role::column('name'), $roles);
                });
            },
        ];
    }
public function getSearchableRules(): array
    {
        return [
            'roles:[]' => function (Builder $query, array $roles) {
                return $query->whereHas('roles', function (Builder $query) use ($roles) {
                    return $query->whereIn(Role::column('name'), $roles);
                });
            },
        ];
    }
public function getSearchableRules ( ) : array { return [ 'roles:[]' => function ( Builder $ query , array $ roles ) { return $ query -> whereHas ( 'roles' , function ( Builder $ query ) use ( $ roles ) { return $ query -> whereIn ( Role :: column ( 'name' ) , $ roles ) ; } ) ; } , ] ; }
Get searchable rules.

@return array
Get searchable rules .