public function transform(Job $job)
    {
        return [
            'createdAt' => $job->created_at->toW3cString(),
            'memberIds' => $job->members->pluck('id'),
            'memberName' => (count($job->members) > 0) ? $job->members->first()->user->name : null,
            'memberTagIds' => $job->member_tags->pluck('id'),
            'memberTagNames' => (count($job->member_tags) > 0)
                ? implode(', ', $job->member_tags->pluck('name')->toArray()) : null,
            'id' => $job->id,
            'locationId' => $job->location_id,
            'locationName' => is_null($job->location_id) ? null : $job->location->name,
            'start' => $job->start->toW3cString(),
            'updatedAt' => $job->updated_at->toW3cString(),
        ];
    }
public function transform(Job $job)
    {
        return [
            'createdAt' => $job->created_at->toW3cString(),
            'memberIds' => $job->members->pluck('id'),
            'memberName' => (count($job->members) > 0) ? $job->members->first()->user->name : null,
            'memberTagIds' => $job->member_tags->pluck('id'),
            'memberTagNames' => (count($job->member_tags) > 0)
                ? implode(', ', $job->member_tags->pluck('name')->toArray()) : null,
            'id' => $job->id,
            'locationId' => $job->location_id,
            'locationName' => is_null($job->location_id) ? null : $job->location->name,
            'start' => $job->start->toW3cString(),
            'updatedAt' => $job->updated_at->toW3cString(),
        ];
    }
public function transform ( Job $ job ) { return [ 'createdAt' => $ job -> created_at -> toW3cString ( ) , 'memberIds' => $ job -> members -> pluck ( 'id' ) , 'memberName' => ( count ( $ job -> members ) > 0 ) ? $ job -> members -> first ( ) -> user -> name : null , 'memberTagIds' => $ job -> member_tags -> pluck ( 'id' ) , 'memberTagNames' => ( count ( $ job -> member_tags ) > 0 ) ? implode ( ', ' , $ job -> member_tags -> pluck ( 'name' ) -> toArray ( ) ) : null , 'id' => $ job -> id , 'locationId' => $ job -> location_id , 'locationName' => is_null ( $ job -> location_id ) ? null : $ job -> location -> name , 'start' => $ job -> start -> toW3cString ( ) , 'updatedAt' => $ job -> updated_at -> toW3cString ( ) , ] ; }
Transformer to generate JSON response with summary Job data

@return array
Transformer to generate JSON response with summary Job data