Esempio n. 1
0
 public function dashboard()
 {
     $venues = Venue::orderBy('name', 'asc')->get();
     $bands = Band::orderBy('name', 'asc')->get();
     $events = Event::orderBy('date', 'asc')->get();
     $events_future = Event::futureEvents();
     $events_past = Event::pastEvents();
     return view('dashboard', compact('venues', 'events', 'events_future', 'events_past', 'bands'));
 }
Esempio n. 2
0
 /**
  * Display a dynamically generated mailer based on data available now.
  *
  * @return \Illuminate\Http\Response
  */
 public function now()
 {
     $events = Event::futureEvents()->get();
     $categories = Category::orderBy('title', 'asc')->get();
     $subscriber = new Subscriber();
     $subscriber->name = 'Andy Gott';
     $subscriber->email = '*****@*****.**';
     Mail::send('emails.subscribers.mailer', ['subscriber' => $subscriber, 'events' => $events, 'categories' => $categories], function ($m) use($subscriber) {
         $m->from('*****@*****.**', 'See+Do')->to($subscriber->email, $subscriber->name)->subject('Weekly Round-Up of Things to See+Do in Manchester')->getHeaders()->addTextHeader('X-MC-Subaccount', 'see-do');
     });
     return view('mailers.now', compact('events'));
 }
Esempio n. 3
0
 public function viewAll()
 {
     $events_future = Event::futureEvents();
     $events_past = Event::pastEvents();
     return view('archive-event', compact('events_future', 'events_past'));
 }