protected function respondRelatedNotes($noteableId, $objectType)
    {
        $notes = Note::where('noteable_id', $noteableId)
            ->orderBy('created_at', 'desc')
            ->get();
        return fractal($notes, new NoteTransformer())
            ->withResourceName("{$objectType}Note")
            ->respond();
    }
protected function respondRelatedNotes($noteableId, $objectType)
    {
        $notes = Note::where('noteable_id', $noteableId)
            ->orderBy('created_at', 'desc')
            ->get();
        return fractal($notes, new NoteTransformer())
            ->withResourceName("{$objectType}Note")
            ->respond();
    }
protected function respondRelatedNotes ( $ noteableId , $ objectType ) { $ notes = Note :: where ( 'noteable_id' , $ noteableId ) -> orderBy ( 'created_at' , 'desc' ) -> get ( ) ; return fractal ( $ notes , new NoteTransformer ( ) ) -> withResourceName ( "{$objectType}Note" ) -> respond ( ) ; }
Produce a list of Notes related to a selected object

@param $id string UUID of Job
@return \Illuminate\Http\Response List of Notes
Produce a list of Notes related to a selected object