collection() public method

Bind a collection to a transformer and start building a response.
public collection ( Collection $collection, object $transformer, array | Closure $parameters = [], Closure $after = null ) : Response
$collection Illuminate\Support\Collection
$transformer object
$parameters array | Closure
$after Closure
return Dingo\Api\Http\Response
Beispiel #1
0
 /**
  * Bind a collection to a transformer and start building a response.
  *
  * @param \Illuminate\Support\Collection $collection
  * @param object $transformer
  * @param array $parameters
  * @param \Closure $after
  * @return \Dingo\Api\Http\Response 
  * @static 
  */
 public static function collection($collection, $transformer, $parameters = array(), $after = null)
 {
     return \Dingo\Api\Http\Response\Factory::collection($collection, $transformer, $parameters, $after);
 }