/**
  * Show the application dashboard.
  *
  * @return \Illuminate\Http\Response
  */
 public function index()
 {
     $events = \EmailManager\Event::latest()->with('user')->take('10')->get();
     return view('home', compact('events'));
 }
 public function onEmailWasUnsubscribed($event)
 {
     Event::create(['subject' => $event->email, 'action' => 'unsubscribed', 'field' => 'email', 'new' => 'unsubscribed', 'user_id' => $event->user->id]);
 }