src/Conductors/Concerns/FindsAndCreatesAbilities.php
protected function getModelAbilityKeys($abilities, $model, array $attributes)
    {
        $abilities = Collection::make(is_array($abilities) ? $abilities : [$abilities]);

        $models = Collection::make(is_array($model) ? $model : [$model]);

        return $abilities->map(function ($ability) use ($models, $attributes) {
            return $models->map(function ($model) use ($ability, $attributes) {
                return $this->getModelAbility($ability, $model, $attributes)->getKey();
            });
        })->collapse()->all();
    }
protected function getModelAbilityKeys($abilities, $model, array $attributes)
    {
        $abilities = Collection::make(is_array($abilities) ? $abilities : [$abilities]);

        $models = Collection::make(is_array($model) ? $model : [$model]);

        return $abilities->map(function ($ability) use ($models, $attributes) {
            return $models->map(function ($model) use ($ability, $attributes) {
                return $this->getModelAbility($ability, $model, $attributes)->getKey();
            });
        })->collapse()->all();
    }
protected function getModelAbilityKeys ( $ abilities , $ model , array $ attributes ) { $ abilities = Collection :: make ( is_array ( $ abilities ) ? $ abilities : [ $ abilities ] ) ; $ models = Collection :: make ( is_array ( $ model ) ? $ model : [ $ model ] ) ; return $ abilities -> map ( function ( $ ability ) use ( $ models , $ attributes ) { return $ models -> map ( function ( $ model ) use ( $ ability , $ attributes ) { return $ this -> getModelAbility ( $ ability , $ model , $ attributes ) -> getKey ( ) ; } ) ; } ) -> collapse ( ) -> all ( ) ; }
Get the abilities for the given model ability descriptors.

@param  array|string  $abilities
@param  \Illuminate\Database\Eloquent\Model|string|array  $model
@param  array  $attributes
@return array
Get the abilities for the given model ability descriptors .