/**
  * Display a listing of the resource.
  *
  * @param FellowshipTransformer $transformer
  * @param null $fellowshipId
  * @param MeetingsRepository $repo
  * @return \Illuminate\Http\Response
  * @internal param null $id
  */
 public function index(FellowshipTransformer $transformer, MeetingsRepository $repo, $fellowshipId = null)
 {
     $meetings = $fellowshipId ? $repo->getMeetingsByFellowship($fellowshipId) : Fellowship::where('active', 1)->orderBy('fellowship', 'ASC')->get();
     if (!empty($fellowshipId)) {
         header("Access-Control-Allow-Origin: *");
         return response()->json(['data' => $meetings], 200, $this->getHeaders());
     } else {
         return $this->respond(['data' => $transformer->transformCollection($meetings->toArray())]);
     }
 }
 /**
  * Display the specified resource.
  *
  * @param  int $id
  * @param MeetingsRepository $repo
  * @param MeetingsByDayTransformer $transformer
  * @return \Illuminate\Http\Response
  */
 public function show($id, MeetingsRepository $repo, MeetingsByDayTransformer $transformer)
 {
     $meetings = $repo->getMeetingsByDay($id);
     return $this->respond(['data' => $transformer->transform($meetings)]);
 }
 /**
  * Display the specified resource.
  *
  * @param  int $id
  * @param MeetingsRepository $repo
  * @param MeetingsByFellowshipTransformer $transformer
  * @return \Illuminate\Http\Response
  */
 public function show($id, MeetingsRepository $repo, MeetingsByFellowshipTransformer $transformer)
 {
     $meetings = $repo->getMeetingsByFellowshipWithDayIndex($id);
     return $this->respond(['data' => $transformer->transformCollection($meetings)]);
 }