/** * Creates all Check related URLs for the site * * @param string $type The type of URL to make: 'list', 'add', 'edit', 'delete' * @param Meetup $obj The Check object for the edit and delete URL types * @return string The URL requested */ public static function makeURL($type, $obj = NULL) { switch ($type) { case 'list': return 'subscription.php'; case 'add': return 'subscription.php?action=add&check_id=' . (int) $obj->getCheckId(); case 'edit': return 'subscription.php?action=edit&subscription_id=' . (int) $obj->getSubscriptionId(); case 'delete': return 'subscription.php?action=delete&subscription_id=' . (int) $obj->getSubscriptionId(); } }
/** * Creates all Check related URLs for the site * * @param string $type The type of URL to make: 'list', 'add', 'edit', 'delete' * @param Meetup $obj The Check object for the edit and delete URL types * @return string The URL requested */ static public function makeURL($type, $obj=NULL) { switch ($type) { case 'list': return 'subscription.php'; case 'add': return 'subscription.php?action=add&check_id=' . $obj->prepareCheck_Id(); case 'edit': return 'subscription.php?action=edit&subscription_id=' . $obj->prepareSubscription_Id(); case 'delete': return 'subscription.php?action=delete&subscription_id=' . $obj->prepareSubscription_Id(); } }
/** * Creates all Check related URLs for the site * * @param string $type The type of URL to make: 'list', 'add', 'edit', 'delete' * @param Meetup $obj The Check object for the edit and delete URL types * @return string The URL requested */ static public function makeURL($type, $obj=NULL) { switch ($type) { case 'list': return 'result.php?action=list&check_id=' . $obj->prepareCheckId(); return ''; case 'edit': return 'result.php?action=edit&check_id=' . $obj->prepareCheckId(); case 'delete': return 'result.php?action=delete&check_id=' . $obj->prepareCheckId(); case 'ackAll': return 'result.php?action=ackAll&check_id=' . $obj->prepareCheckId(); } }
public function dashboard() { $user = Auth::user(); $publicnotes = Note::where('user_id', '=', Auth::user()->id)->where('public_or_private', '=', 'public')->get(); $privatenotes = Note::where('user_id', '=', Auth::user()->id)->where('public_or_private', '=', 'private')->get(); $publicsheets = Sheet::where('user_id', '=', Auth::user()->id)->where('public_or_private', '=', 'public')->get(); $privatesheets = Sheet::where('user_id', '=', Auth::user()->id)->where('public_or_private', '=', 'private')->get(); $publicmeetups = Meetup::where('admin_id', '=', Auth::user()->id)->get(); $yournotes = Note::where('user_id', '=', Auth::user()->id)->take(5)->get(); $yoursheets = Sheet::where('user_id', '=', Auth::user()->id)->take(5)->get(); $yourmeetups = Meetup::where('admin_id', '=', Auth::user()->id)->take(5)->get(); $userlists = DB::table('sheets')->where('user_id', Auth::user()->id)->orderBy('created_at', 'desc')->paginate(5); $usernotes = DB::table('notes')->where('user_id', Auth::user()->id)->orderBy('created_at', 'desc')->paginate(5); $alladmin = DB::table('meetups')->where('admin_id', Auth::user()->id)->orderBy('created_at', 'desc')->paginate(5); $allmeetups = DB::table('attendees')->where('attendee_id', Auth::user()->id)->orderBy('created_at', 'desc')->paginate(5); $meetupsyouarepartof = []; if ($allmeetups != null) { foreach ($allmeetups as $individualmeetups) { $meetup = Meetup::find($individualmeetups->meetup_id); array_push($meetupsyouarepartof, $meetup->title); } } else { array_push($meetupsyouarepartof, 'You are not attending any meetups, or you are admin of all of them!'); } return View::make('/users/dashboard')->with('user', $user)->with('userlists', $userlists)->with('usernotes', $usernotes)->with('alladmin', $alladmin)->with('meetupsyouarepartof', $meetupsyouarepartof)->with('publicnotes', $publicnotes)->with('privatenotes', $privatenotes)->with('publicsheets', $publicsheets)->with('privatesheets', $privatesheets)->with('publicmeetups', $publicmeetups)->with('yournotes', $yournotes)->with('yoursheets', $yoursheets)->with('yourmeetups', $yourmeetups); }
/** * Creates all Check related URLs for the site * * @param string $type The type of URL to make: 'list', 'add', 'edit', 'delete' * @param Meetup $obj The Check object for the edit and delete URL types * @return string The URL requested */ public static function makeURL($type, $obj = NULL) { switch ($type) { case 'list': return 'result.php?action=list&check_id=' . (int) $obj->getCheckId(); case 'edit': return 'result.php?action=edit&check_id=' . (int) $obj->getCheckId(); case 'delete': return 'result.php?action=delete&check_id=' . (int) $obj->getCheckId(); case 'ackAll': return 'result.php?action=ackAll&check_id=' . (int) $obj->getCheckId(); case 'notifyAll': return 'result.php?action=notifyAll&check_id=' . (int) $obj->getCheckId(); } }
public function run() { $meetup1 = new Meetup(); $meetup1->title = "Bio Test Study Group"; $meetup1->description = "Lets get together and study about Mitochondria!"; $meetup1->time = "12:00 pm"; $meetup1->date = "July 4, 2016"; $meetup1->location = "McDonalds (8th street)"; $meetup1->admin_id = 1; $meetup1->save(); $meetup2 = new Meetup(); $meetup2->title = "Criminal Justice 1100 Pre-test Study"; $meetup2->description = "If you are also having trouble with the felony list, come join me!"; $meetup2->time = "1:00 pm"; $meetup2->date = "February 17, 2016"; $meetup2->location = "Pete's Pizza"; $meetup2->admin_id = 1; $meetup2->save(); $meetup3 = new Meetup(); $meetup3->title = "Business Ethics 1450 study group"; $meetup3->description = "Guys, I really need some help with this."; $meetup3->time = "12:00 pm"; $meetup3->date = "March 13, 2016"; $meetup3->location = "Central Park"; $meetup3->admin_id = 1; $meetup3->save(); $meetup4 = new Meetup(); $meetup4->title = "Sci-Fi and the Environment meetup"; $meetup4->description = "For those who want help with the Avatar section"; $meetup4->time = "12:00 pm"; $meetup4->date = "February 4, 2016"; $meetup4->location = "Bob's House"; $meetup4->admin_id = 2; $meetup4->save(); $meetup5 = new Meetup(); $meetup5->title = "U.S. Politics Final Study Group"; $meetup5->description = "We'll be covering the judicial branch unit"; $meetup5->time = "2:00 pm"; $meetup5->date = "March 15, 2016"; $meetup5->location = "John Jay High School, Room 104"; $meetup5->admin_id = 2; $meetup5->save(); $meetup6 = new Meetup(); $meetup6->title = "Study for Mrs. French's test"; $meetup6->description = "Lets get together and study for this test!"; $meetup6->time = "2:00 pm"; $meetup6->date = "March 18, 2016"; $meetup6->location = "Pizza shop"; $meetup6->admin_id = 3; $meetup6->save(); $meetup7 = new Meetup(); $meetup7->title = "Codeup entry exam study group"; $meetup7->description = "We all want to get into codeup, so lets go study!"; $meetup7->time = "3:00 pm"; $meetup7->date = "March 23, 2016"; $meetup7->location = "7th floor of Geekdom"; $meetup7->admin_id = 3; $meetup7->save(); $meetup8 = new Meetup(); $meetup8->title = "Agricultural Leadership Final Study Group"; $meetup8->description = "We've come this far! Let's do it!"; $meetup8->time = "8:00 am"; $meetup8->date = "February 7, 2016"; $meetup8->location = "Coffee Station"; $meetup8->admin_id = 4; $meetup8->save(); $meetup9 = new Meetup(); $meetup9->title = "Social Notes Variety Study Event"; $meetup9->description = "Whatever you have to study for, bring it, and lets all study together!"; $meetup9->time = "5:00 pm"; $meetup9->date = "February 10, 2016"; $meetup9->location = "Social Notes HQ, San Antonio"; $meetup9->admin_id = 5; $meetup9->save(); $meetup10 = new Meetup(); $meetup10->title = "Heroes of Bebop - MUSC 2100 - Study Group"; $meetup10->description = "From Charlie Parker to Dizzy Gillespie, we'll study about them for this big test!"; $meetup10->time = "1:00 pm"; $meetup10->date = "March 23, 2016"; $meetup10->location = "Charles A. Vancouver Memorial Library"; $meetup10->admin_id = 5; $meetup10->save(); }
$newRating = new Rater($other_id); $newRating->output(); } else { if ($case3) { //Show the pickup countdown $newPickup = new Pickup($duedate); $newPickup->output(); } else { //If the meeting date has not been determined... if ($meetdt == 0) { //...show the calender $newCal = new Calender(trim($oid)); $newCal->output(); } else { //...print out the countdown to the meetup $newMeetup = new Meetup($meetdt); $newMeetup->output(); } } } echo "</div>"; //Close the main container ?> <script src="https://maps.googleapis.com/maps/api/js?v=3.exp&sensor=true"></script> <script type="text/javascript" src="/lib/min/?g=js"></script> <?php Body::end(false); HTML::end(); mysqli_close($con); //Close the existing MySQL connection
/** * Creates all Check related URLs for the site * * @param string $type The type of URL to make: 'list', 'add', 'edit', 'delete' * @param Meetup $obj The Check object for the edit and delete URL types * @return string The URL requested */ static public function showGraph($obj=NULL,$img=true,$sample=false,$width=false,$hideLegend=false) { if ($img) { $link = '<img src="'; } else { $link = '<a href="'; } $link .= GRAPHITE_URL . '/render/?'; $link .= 'target=legendValue(alias(' . $obj->prepareTarget() . '%2C%22Check : ' . $obj->prepareName() .'%22),%22last%22)'; //$link .= 'target=legendValue(' . $obj->prepareTarget() .',%22last%22)'; if ($sample !== False) { $link .= '&from=' . $sample; } else { $link .= '&from=' . $obj->prepareSample(); } if ($width !== false) { $link .= '&width=' .$width; } else { $link .= '&width=' .GRAPH_WIDTH; } $link .= '&height=' .GRAPH_HEIGHT; $link .= '&target=color(alias(threshold('. $obj->getError() . ')%2C%22Error%20('. $obj->getError() . ')%22)%2C%22' . ERROR_COLOR . '%22)'; $link .= '&target=color(alias(threshold('. $obj->getWarn() . ')%2C%22Warning%20('. $obj->getWarn() . ')%22)%2C%22' . WARN_COLOR . '%22)'; if ($hideLegend !== false) { $link .= '&hideLegend=true'; } if ($img) { $link .= '" title="' . $obj->prepareName() . '" alt="' . $obj->prepareName(); $link .= '" />'; } else { $link .= '"> ' . $obj->prepareTarget() .'</a>'; } return $link; }
function test_confirmMeetUserTwo() { //Arrange $user_name = "Nathan"; $password = "******"; $latitude = 45.520969; $longitude = -122.679953; $signed_in = 1; $id = 1; $test_user = new User($user_name, $password, $longitude, $latitude, $signed_in, $id); $test_user->save(); $user_name2 = "John"; $password2 = "xxx"; $latitude2 = 45.515852; $longitude2 = -122.674644; $signed_in2 = 1; $id2 = 1; $test_user2 = new User($user_name2, $password2, $longitude2, $latitude2, $signed_in2, $id2); $test_user2->save(); $place_name = "Director Park"; $address = "SW Park Ave"; $longitude = 45.518672; $latitude = -122.681211; $id3 = 5; $test_place = new Place($place_name, $address, $longitude, $latitude, $id3); //Act $test_user->addMeetUpRequest($test_user2->getId(), $test_place->getId()); $test_user2->confirmMeetupRequest($test_user->getId()); $test_user2->confirmMeetUserTwo($test_user->getId(), $test_user2->getId(), true); $meetup_array = Meetup::getAll(); $result = $meetup_array[0]->getConfirm_meet_usr2(); //Assert $this->assertEquals(true, $result); }
echo $meetup->prepareState(); ?> </td> <td class="actions"> <a href="<?php echo Meetup::makeURL('edit', $meetup); ?> ">Edit</a> | <a href="<?php echo Meetup::makeURL('delete', $meetup); ?> ">Delete</a> </td> </tr> <?php } ?> </table> <?php } catch (fEmptySetException $e) { ?> <p class="info">There are currently no meetups. <a href="<?php echo Meetup::makeURL('add'); ?> ">Add one now</a></p> <?php } ?> </div> <?php $tmpl->place('footer');
require_once 'modules/prettyprint.php'; if (!isset($_SESSION['returnURL']) || isset($_GET['returnURL'])) { if (isset($_GET['returnURL'])) { $_SESSION['returnURL'] = $_GET['returnURL']; } else { $_SESSION['returnURL'] = $ROOT; } } if (!isset($_SESSION['logged']) || !isset($_SESSION['user'])) { if (!isset($_GET['code'])) { $meetup = new Meetup(); $meetup->authorize(array('client_id' => $client_id, 'redirect_uri' => $redirect_uri)); } else { $meetup = new Meetup(array("client_id" => $client_id, "client_secret" => $client_secret, "redirect_uri" => $redirect_uri, "code" => $_GET['code'])); $r1 = $meetup->access(); $meetup = new Meetup(array("access_token" => $r1->access_token)); $_SESSION["access_token"] = $r1->access_token; $r2 = $meetup->getMemberInfo(array('member_id' => 'self')); $GeodevDB = new GeodevDB(array("meetup_id" => $r2->id)); $user = $GeodevDB->getUser(array("type" => "userprofile")); $_SESSION['meetup_member'] = $r2; if (isset($user["meetup_id"])) { $_SESSION['user'] = $user; } else { // Set $_SESSION var $_SESSION['user'] = array("meetup_id" => $r2->id, "name" => $r2->name, "photo_id" => $r2->photo->photo_id); if (isset($r2->photo)) { if (isset($r2->photo->highres_link)) { $photo = $r2->photo->highres_link; } elseif (isset($r2->photo->photo_link)) { $photo = $r2->photo->photo_link;
static function find($search_id) { $found_meetup = null; $meetups = Meetup::getAll(); foreach ($meetups as $meetup) { $meetup_id = $meetup->getId(); if ($meetup_id == $search_id) { $found_meetup = $meetup; } } return $found_meetup; }
public function showinvite($id) { $meetup = Meetup::find($id); if (Auth::user()->id == $meetup->admin_id) { return View::make('/meetups/invite')->with('meetup', $meetup); } }
public function destroy() { $id = Auth::user()->id; $usertodelete = User::find($id); $usernotes = DB::table('notes')->where('user_id', $id); $allnotes = Note::all(); $allsheets = Sheet::all(); $allmeetups = Meetup::all(); $usermeetups = DB::table('meetups')->where('admin_id', $id); $userattending = DB::table('attendees')->where('attendee_id', $id); $usercomments = DB::table('meetcoms')->where('attendee_id', $id); $usernotecomments = DB::table('notecoms')->where('collaborator_id', $id); $usersheetcomments = DB::table('sheetcoms')->where('collaborator_id', $id); $sheetids = []; $meetupids = []; $noteids = []; $usercomments->delete(); $usernotecomments->delete(); $usersheetcomments->delete(); // Collects all notes that the user has made foreach ($allnotes as $note) { if ($note->user_id == $id) { array_push($noteids, $note->id); } } // Deletes all collaborators from any notes the user has made foreach ($noteids as $notes) { $othernotecom = DB::table('notecoms')->where('note_id', $note); $othernotecom->delete(); } // Collects all sheets that the user has made foreach ($allsheets as $sheet) { if ($sheet->user_id == $id) { array_push($sheetids, $sheet->id); } } // deletes all lines and collaboration from others in every sheet the user has made foreach ($sheetids as $sheets) { $userline = DB::table('lines')->where('sheet_id', $sheets); $othersheetcom = DB::table('sheetcoms')->where('sheet_id', $sheets); $userline->delete(); $othersheetcom->delete(); } // Collects all meetups that the user is the admin of foreach ($allmeetups as $meetup) { if ($meetup->admin_id == $id) { array_push($meetupids, $meetup->id); } } // Removes all attendees from all meetups that the user is a part of. foreach ($meetupids as $meetups) { $peopleattending = DB::table('attendees')->where('meetup_id', $meetups); $peopleattending->delete(); } $userattending->delete(); $usernotes->delete(); $userssheets = DB::table('sheets')->where('user_id', $id); $userssheets->delete(); $usermeetups->delete(); $usertodelete->delete(); Session::flash('successMessage', 'Goodbye Forever'); return Redirect::action('UsersController@showlogin'); }
function test_updateConfirm_meet_usr2() { //Arrange $user1_id = 1; $user2_id = 2; $user1_confirm = 1; $user2_confirm = 1; $location_id = 1; $confirm_meet_usr1 = 1; $confirm_meet_usr2 = 0; $id = 1; $test_meetup = new Meetup($user1_id, $user2_id, $user1_confirm, $user2_confirm, $location_id, $confirm_meet_usr1, $confirm_meet_usr2, $id); $test_meetup->save(); $new_confirm_meet_usr2 = 2; //Act $test_meetup->updateConfirm_meet_usr2($new_confirm_meet_usr2); //Assert $this->assertEquals($test_meetup->getConfirm_meet_usr2(), $new_confirm_meet_usr2); }
// <p> // " . $item->desc . "... // </p> // " . $footnote . " // </div> // </div>" . $linkEnd; // } } else { $events = array(); $pastNewsLimit = 60 * 60 * 24 * 30 * 3; // three months $contributors = array(); $contributorsMin = array(); $stars = 0; try { $meetup = new Meetup(array('key' => '{{site.meetup_key}}')); try { $response = $meetup->getEvents(array('group_urlname' => 'Tachyon', 'status' => 'upcoming,past', 'only' => 'name,time,event_url,description')); } catch (Exception $e) { echo $e->getMessage(); } $res = $response->results; foreach ($res as $event) { if ($event->time / 1000 > microtime(true) - $pastNewsLimit) { if (strlen($event->name) > 45) { $event->name = substr($event->name, 0, 45) . "..."; } array_push($events, array("title" => $event->name, "date" => $event->time, "desc" => substr(strip_tags(html_entity_decode($event->description)), 0, 120), "link" => $event->event_url, "type" => "meetup")); } } } catch (Exception $e) {
/** * Creates all Check related URLs for the site * * @param string $type The type of URL to make: 'list', 'add', 'edit', 'delete' * @param Meetup $obj The Check object for the edit and delete URL types * @return string The URL requested */ public static function showGraph($obj = NULL, $img = true, $sample = false, $width = false, $hideLegend = false) { if ($img) { $link = '<img id="renderedGraphImage" src="'; } else { $link = '<a href="'; } if ($GLOBALS['PRIMARY_SOURCE'] == "GANGLIA") { $parts = explode("_|_", $obj->prepareTarget()); $link .= $GLOBALS['GANGLIA_URL'] . "/graph.php?json=1&ce=now&c=" . $parts[0] . "&h=" . $parts[1] . "&m=" . $parts[2]; if ($sample !== False) { $link .= '&cs=' . $sample; } else { $link .= '&cs=-' . $obj->prepareSample() . 'minutes'; } } else { $link .= $GLOBALS['GRAPHITE_URL'] . '/render/?'; $link .= 'target=legendValue(alias(' . Check::constructTarget($obj) . '%2C%22Check : ' . $obj->prepareName() . '%22),%22last%22)'; if ($sample !== False) { $link .= '&from=' . $sample; } else { $link .= '&from=-' . $obj->prepareSample() . 'minutes'; } if ($width !== false) { $link .= '&width=' . $width; } else { $link .= '&width=' . $GLOBALS['GRAPH_WIDTH']; } $link .= '&height=' . $GLOBALS['GRAPH_HEIGHT']; $link .= '&target=color(alias(threshold(' . $obj->getError() . ')%2C%22Error%20(' . $obj->getError() . ')%22)%2C%22' . $GLOBALS['ERROR_COLOR'] . '%22)'; $link .= '&target=color(alias(threshold(' . $obj->getWarn() . ')%2C%22Warning%20(' . $obj->getWarn() . ')%22)%2C%22' . $GLOBALS['WARN_COLOR'] . '%22)'; if ($hideLegend !== false) { $link .= '&hideLegend=true'; } } if ($img) { $link .= '" title="' . $obj->prepareName() . '" alt="' . $obj->prepareName(); $link .= '" />'; } else { $link .= '"> ' . $obj->prepareTarget() . '</a>'; } return $link; }
* API Helper for GDI HQ * Kristen Curtze - Chapter Leader @ GDI Rochester */ require '../config.php'; require '../meetup.php'; if (!empty($_POST['chapter_url'])) { $eventList = null; $error = false; //get URL from form $gdiChapter = $_POST['chapter_url']; //explode full URL to just ending $gdiChapter = explode("meetup.com/", $gdiChapter); //clean extra slashes $gdiChapter = str_replace("/", "", $gdiChapter[1]); try { $meetup = new Meetup(array('key' => $MEETUP_KEY)); $results = $meetup->getEvents(array('group_urlname' => $gdiChapter, 'status' => 'past', 'desc' => 'true')); foreach ($results->results as $meet) { $eventList .= "<strong>What:</strong> " . $meet->name . "<br/>"; $eventList .= "<strong>When:</strong> " . date('m/d/Y g:i a', $meet->time / 1000) . "<br/>"; $eventList .= "<strong>Where:</strong> " . $meet->venue->name . "<br/>"; $eventList .= $meet->venue->address_1 . " / "; if (!empty($meet->venue->address_2)) { $eventList .= $meet->venue->address_2 . " / "; } $eventList .= $meet->venue->city . ", " . $meet->venue->state . " " . $meet->venue->zip; $eventList .= "<br/><br/>"; } } catch (Exception $e) { $error = $e->getMessage(); }
* API Helper for GDI HQ * Kristen Curtze - Chapter Leader @ GDI Rochester */ require '../config.php'; require '../meetup.php'; if (!empty($_POST['chapter_url'])) { $groupID = null; $error = false; //get URL from form $gdiChapter = $_POST['chapter_url']; //explode full URL to just ending $gdiChapter = explode("meetup.com/", $gdiChapter); //clean extra slashes $gdiChapter = str_replace("/", "", $gdiChapter[1]); try { $meetup = new Meetup(array('key' => $MEETUP_KEY)); $results = $meetup->getGroups(array('group_urlname' => $gdiChapter)); foreach ($results->results as $meet) { $groupID = $meet->id; } } catch (Exception $e) { $error = $e->getMessage(); } } ?> <!DOCTYPE html> <html lang="en"> <head> <!-- Basic Page Needs –––––––––––––––––––––––––––––––––––––––––––––––––– -->
$progressArray[] = array('date' => date('m/d/Y', $feed->time / 1000), 'meetup_id' => $feed->group->id, 'has_next' => strlen($results->meta->next)); } //See if there is more data ("next" is set) -- loop through again if so... if (strlen($results->meta->next) > 0) { $nextSet = $meetup->getNext($results); loopThroughNext($meetup, $nextSet, $progressArray); } } if (!empty($_POST['meetup_ids'])) { $groupID = null; $error = false; $gdiChapter = $_POST['meetup_ids']; $timeFrame = $_POST['meetup_range']; $finalArray = array(); try { $meetup = new Meetup(array('key' => $MEETUP_KEY)); $results = $meetup->getEvents(array('group_id' => $gdiChapter, 'page' => '200', 'status' => 'upcoming,past', 'time' => $timeFrame)); //Meetup has a limit so we need to loop through it to get all chapter info loopThroughNext($meetup, $results, $finalArray); //Pass back results to be parsed by jquery echo json_encode($finalArray); } catch (Exception $e) { $error = $e->getMessage(); } } else { ?> <!DOCTYPE html> <html lang="en"> <head> <!-- Basic Page Needs
<?php include dirname(__FILE__) . '/cache/top-cache.php'; include dirname(__FILE__) . "/meetupAPI.php"; include dirname(__FILE__) . "/apiKeys.php"; $cities = array('MTL', 'TO', 'KW', 'VAN', 'SF', 'BOS', 'PAR', 'AMS', 'LAX', 'NYC', 'LDN', 'BCN', 'LIMA', 'DC', 'OSLO', 'MUC', 'SR'); $totalMembers = 0; $totalEvents = 0; $meetup = new Meetup(array('key' => $meetup_key)); $members_and_events_array = array('meetupMembersCount' => array(), 'meetupEventsCount' => array()); foreach ($cities as $city) { $membersResponse = $meetup->getGroup(array('urlname' => "NeuroTech{$city}")); $eventsResponse = $meetup->getEvents(array('group_urlname' => "NeuroTech{$city}", 'status' => "upcoming,past")); // Assign the members count of a city's meetup group to a separate variable. // For example, the member count of Montreal's meetup group will be $MTL_members_count $members_and_events_array['meetupMembersCount'][$city] = $membersResponse->members; $members_and_events_array['meetupEventsCount'][$city] = count($eventsResponse); $totalMembers += $membersResponse->members; $totalEvents += count($eventsResponse); } // Get members count for the Paris-CogLab-Meetup-Cognitive-Science-Open-Lab group $ParisCogLab = "Paris-CogLab-Meetup-Cognitive-Science-Open-Lab"; $membersResponse = $meetup->getGroup(array('urlname' => $ParisCogLab)); $eventsResponse = $meetup->getEvents(array('group_urlname' => $ParisCogLab, 'status' => "upcoming,past")); $members_and_events_array['meetupMembersCount']['ParisCogLab'] = $membersResponse->members; $members_and_events_array['meetupEventsCount']['ParisCogLab'] = count($eventsResponse); $totalMembers += $membersResponse->members; $totalEvents += count($eventsResponse); $members_and_events_array['meetupMembersCount']['total'] = $totalMembers; $members_and_events_array['meetupEventsCount']['total'] = $totalEvents; echo json_encode($members_and_events_array);
public function showMeetups() { $meetups = Meetup::with('attendees')->orderBy('created_at', 'desc')->paginate(10); return View::make('feed.meets')->with('meetups', $meetups); }