Exemplo n.º 1
0
 public function accessLog($loggableId, $type)
 {
     $accessLog = new AccessLog();
     $accessLog->loggable_id = $loggableId;
     $accessLog->loggable_type = $type;
     $accessLog->save();
 }
 public function dashboard()
 {
     /*
      * @array of Collection Objects
      * Contains ['yes', 'no', 'maybe' ,'optOut', 'all', 'numbers']
      */
     $allRsvps = $this->rsvp->getAllRsvps();
     //$attendees = $this->guest->getAttendees();
     //last invitations actually accessed
     $accessLog = AccessLog::where('loggable_type', 'invitation')->orderBy('created_at', 'asc')->take('100');
     /*
      * @array of Collection Objects
      * Contains ['active', 'inactive']
      */
     $allUsers = $this->user->getUsers();
     return view('admin.dashboard', ['rsvps' => $allRsvps, 'users' => $allUsers, 'accessLog' => $accessLog]);
 }