コード例 #1
0
 public function index($commuintyIds, Responder $responder)
 {
     $commuintyIds = explode(',', $commuintyIds);
     $news = [];
     $events = [];
     foreach ($commuintyIds as $id) {
         $communityNewsItems = Models\Community\CommunityNews::with('news')->where('iCommunityId', '=', $id)->get()->toArray();
         foreach ($communityNewsItems as $item) {
             $news[] = $item;
         }
     }
     foreach ($commuintyIds as $id) {
         $communityEventItems = Models\Community\CommunityEvent::with('event')->where('iCommunityId', '=', $commuintyIds[0])->get()->toArray();
         foreach ($communityEventItems as $item) {
             $events[] = $item;
         }
     }
     $merged = array_merge($news, $events);
     return $responder->respondWithPayload($merged);
 }
コード例 #2
0
 public function index($communityId, Responder $responder)
 {
     $community = Community\Community::with('communityHours')->with('enabledInterfaces')->find($communityId);
     return $responder->respondWithPayload($community);
 }
コード例 #3
0
 public function index($communityId, Responder $responder)
 {
     $contactFormLeads = Community\ContactFormLead::where('community_id', '=', $communityId)->get();
     return $responder->respondWithPayload($contactFormLeads);
 }
コード例 #4
0
 public function index(Responder $responder)
 {
     return $responder->respondWithPayload(Community\Community::all());
 }