src/Conductors/Concerns/FindsAndCreatesAbilities.php
protected function getAbilityIds($abilities, $model = null, array $attributes = [])
    {
        if ($abilities instanceof Model) {
            return [$abilities->getKey()];
        }

        if ( ! is_null($model)) {
            return $this->getModelAbilityKeys($abilities, $model, $attributes);
        }

        if (Helpers::isAssociativeArray($abilities)) {
            return $this->getAbilityIdsFromMap($abilities, $attributes);
        }

        if (! is_array($abilities) && ! $abilities instanceof Collection) {
            $abilities = [$abilities];
        }

        return $this->getAbilityIdsFromArray($abilities, $attributes);
    }
protected function getAbilityIds($abilities, $model = null, array $attributes = [])
    {
        if ($abilities instanceof Model) {
            return [$abilities->getKey()];
        }

        if ( ! is_null($model)) {
            return $this->getModelAbilityKeys($abilities, $model, $attributes);
        }

        if (Helpers::isAssociativeArray($abilities)) {
            return $this->getAbilityIdsFromMap($abilities, $attributes);
        }

        if (! is_array($abilities) && ! $abilities instanceof Collection) {
            $abilities = [$abilities];
        }

        return $this->getAbilityIdsFromArray($abilities, $attributes);
    }
protected function getAbilityIds ( $ abilities , $ model = null , array $ attributes = [ ] ) { if ( $ abilities instanceof Model ) { return [ $ abilities -> getKey ( ) ] ; } if ( ! is_null ( $ model ) ) { return $ this -> getModelAbilityKeys ( $ abilities , $ model , $ attributes ) ; } if ( Helpers :: isAssociativeArray ( $ abilities ) ) { return $ this -> getAbilityIdsFromMap ( $ abilities , $ attributes ) ; } if ( ! is_array ( $ abilities ) && ! $ abilities instanceof Collection ) { $ abilities = [ $ abilities ] ; } return $ this -> getAbilityIdsFromArray ( $ abilities , $ attributes ) ; }
Get the IDs of the provided abilities.

@param  \Illuminate\Database\Eloquent\model|array|int  $abilities
@param  \Illuminate\Database\Eloquent\Model|string|array|null  $model
@param  array  $attributes
@return array
Get the IDs of the provided abilities .