/**
  * Show dashboard lists and activity stream
  *
  * @param PlansApi $plansApi
  * @param ActivityStreamApi $activityApi
  * @return array|\Illuminate\Contracts\View\Factory|\Illuminate\View\View|mixed
  */
 public function index(PlansApi $plansApi, ActivityStreamApi $activityApi)
 {
     // Get created and assigned plans
     $plans = $plansApi->getDashboardLists();
     // Get activity stream
     $activities = $activityApi->getActivityStream();
     // Return view
     return view('pages.main.dashboard', compact('plans', 'activities'));
 }
 /**
  * Handle the event when responding plan
  *
  * @param $event
  */
 public function onRespondingPlan($event)
 {
     $data = $event->planData;
     // Update plan status
     $results = $this->jobsApi->updatePlanStatus($data['plan_id']);
     // Log activity stream
     $this->asApi->saveActivityStream(array_merge($data, $results));
     // Mail all test browsers
     $this->emailApi->sendEmail('ticket_response', array_merge($data, $results));
 }