src/ExtractTags.php
public static function fromArray(array $data)
    {
        $models = collect($data)->map(function ($value) {
            if ($value instanceof Model) {
                return [$value];
            } elseif ($value instanceof EloquentCollection) {
                return $value->flatten();
            }
        })->collapse()->filter();

        return $models->map(function ($model) {
            return FormatModel::given($model);
        })->all();
    }
public static function fromArray(array $data)
    {
        $models = collect($data)->map(function ($value) {
            if ($value instanceof Model) {
                return [$value];
            } elseif ($value instanceof EloquentCollection) {
                return $value->flatten();
            }
        })->collapse()->filter();

        return $models->map(function ($model) {
            return FormatModel::given($model);
        })->all();
    }
public static function fromArray ( array $ data ) { $ models = collect ( $ data ) -> map ( function ( $ value ) { if ( $ value instanceof Model ) { return [ $ value ] ; } elseif ( $ value instanceof EloquentCollection ) { return $ value -> flatten ( ) ; } } ) -> collapse ( ) -> filter ( ) ; return $ models -> map ( function ( $ model ) { return FormatModel :: given ( $ model ) ; } ) -> all ( ) ; }
Determine the tags for the given array.

@param  array  $data
@return array
Determine the tags for the given array .