app/Http/Resources/Trulies.php
/**
     * Transform the resource collection into an array.
     *
     * @param  \Illuminate\Http\Request  $request
     * @return array
     */
Transform the resource collection into an array.
@param  \Illuminate\Http\Request  $request
@return array
Transform the resource collection into an array . @param \ Illuminate \ Http \ Request $request @return array
public function toArray($request)
    {
        $this->collection->transform(function (Trulie $trulie) {
            return (new TrulieResource($trulie));
        });
        return parent::toArray($request);
    }
public function toArray ( $ request ) { $ this -> collection -> transform ( function ( Trulie $ trulie ) { return ( new TrulieResource ( $ trulie ) ) ; } ) ; return parent :: toArray ( $ request ) ; }
Transform the resource collection into an array.
Transform the resource collection into an array .
//return parent::toArray($request);