protected function create()
 {
     $route = Helpers::routeinfo();
     /*
     		$event 			= Conference::where('slug', '=', $route->params['conference'])
     									->published()
     									->latest();
     */
     $events = Lookup::lookup('conferences', [$route->params['conference']], ['latest' => true, 'published' => true]);
     $event = $events[0];
     $options = Helpers::unserialize($event->options);
     $options['speakers'] = false;
     $options['sponsors'] = false;
     $options['partners'] = false;
     $options = Helpers::options($route, $route->params['conference']);
     $newEvent = Conference::create(['slug' => $route->params['conference'], 'conference' => $event->conference, 'city' => $event->city, 'state' => $event->state, 'start_date' => Carbon::createFromFormat('Y-m-d H:i:s', $event->start_date)->addYear(), 'end_date' => Carbon::createFromFormat('Y-m-d H:i:s', $event->end_date)->addYear(), 'timezone' => $event->timezone, 'coming' => 1, 'about' => $event->about, 'tags' => $event->tags, 'options' => Helpers::serialize($options), 'hero' => $event->hero, 'photo' => $event->photo, 'published' => Carbon::now()]);
     $newEvent = (object) $newEvent->toArray();
     $newAgendas = [];
     $agendas = Lookup::lookup('agendas', ['conference' => $event->id], ['published' => true]);
     if (is_array($agendas)) {
         foreach ($agendas as $agenda) {
             $agenda->conference_id = $newEvent->id;
             $agenda->timeslot = Carbon::createFromFormat('Y-m-d H:i:s', $agenda->timeslot)->addYear();
             $agenda->title = $agenda->type === 'breakout' || $agenda->type === 'session' ? 'Breakout Session' : ($agenda->type === 'break' ? $agenda->title : 'Keynote');
             $agenda->title_short = $agenda->type === 'breakout' || $agenda->type === 'session' ? 'Breakout Session' : ($agenda->type === 'break' ? $agenda->title : 'Keynote');
             $agenda->subtitle = null;
             $agenda->desc = null;
             $agenda->speakers = null;
             $agenda->published = Carbon::now();
             $newAgendas[] = Agenda::create((array) $agenda);
         }
     }
     $container = (object) ['event' => (object) $newEvent, 'agendas' => (object) $newAgendas];
     dd($newEvent);
 }
 public function store(ContactFormRequest $request)
 {
     $route = Helpers::routeinfo();
     $from = [$request->get('email'), ucwords($request->get('name'))];
     $to = ['*****@*****.**', 'Acclaim Events'];
     $subj = 'Contact Form Submission';
     if (count($route->params) === 1) {
         $member = TeamMember::where('first_name', '=', ucwords($route->params['contact']))->take(1)->get();
         if (isset($member[0])) {
             $member = (object) $member[0]->toArray();
             $to = [$member->email, $member->first_name . ' ' . $member->last_name];
             $subj = 'Personal Contact request for ' . $member->first_name . ' ' . $member->last_name;
         }
     }
     $contact = ['from' => $from, 'to' => $to, 'subj' => $subj];
     \Mail::send('emails/contact', ['name' => $request->get('name'), 'email' => $request->get('email'), 'phone' => $request->get('phone'), 'msg' => $request->get('message')], function ($message) use($contact) {
         $fromEmail = $contact['from'][0];
         $fromName = $contact['from'][1];
         $toEmail = $contact['to'][0];
         $toName = $contact['to'][1];
         $subject = $contact['subj'];
         $message->from($fromEmail, $fromName);
         $message->to($toEmail, $toName)->subject($subject);
     });
     return back()->with('message', 'Thanks for contacting us!');
 }
 public function index()
 {
     $route = Helpers::routeinfo();
     $options = Helpers::options($route);
     $navs = Helpers::navigation($route, $options);
     $sub = Helpers::navigation($route, $options, true);
     $fields = $this->getFields();
     $step = (object) ['debug' => $this->debug, 'fields' => $this->fields];
     $step->fields["Basic Information"]->conference->list = $this->getEvents();
     $step->fields["Basic Information"]->attendance->list = $this->getAttendance();
     $step->fields["Badge Details"]->affiliation->list = $this->getAffiliations();
     $step->fields["Address"]->state->list = $this->getStates();
     $step->fields["Basic Information"]->conference->value = $this->getConference($route, $step->fields["Basic Information"]->conference->list);
     return view('pages/register', compact('step', 'route', 'options', 'navs', 'sub'));
 }
 function register()
 {
     /*
     		$show = [
     			'hero'			=> false,
     			'active'		=> false,
     			'title'			=> 'Register',
     		];
     		$show = $this->get_show_preferences($show);
     
     		$event = [
     			'slug'			=> 'austin',
     			'title'			=> 'Austin IT Strategies Conference',
     			'start'			=> '2015-09-15 07:30:00 CDT',
     			'end'			=> '2015-09-15 17:00:00 CDT',
     			'venue'			=> 'Crown Plaza Austin',
     			'location'		=> '6121 North Ih 35, Austin, TX 78752',
     			'place'			=> 'ChIJVzSZghjKRIYREyXBujdzq6w',
     			'directions'	=> 'http://www.ihg.com/crowneplaza/hotels/us/en/austin/ausgz/hoteldetail?cm_mmc=GoogleMaps-_-cp-_-USEN-_-ausgz#map-directions',
     		];
     		$event['date'] = date('F j, Y', strtotime($event['start']));
     
     		$events = [
     			[
     				'slug'			=> 'austin',
     				'title'			=> 'Austin IT Strategies Conference',
     				'city'			=> 'Austin, TX',
     				'start'			=> '2015-09-15 07:30:00 CDT',''
     			],
     			[
     				'slug'			=> 'san-antonio',
     				'title'			=> 'San Antonio IT Strategies Conference',
     				'city'			=> 'San Antonio, TX',
     				'start'			=> '2016-04-21 07:30:00 CST',
     			],
     		];
     
     		foreach ($events as $i => $event) {
     			$events[$i]['date'] = date('F j, Y', strtotime($event['start']));
     		}
     
     		$data = [
     			'show'		=> $show,
     			'event'		=> $event,
     			'events'	=> $events,
     			'nav-sub'	=> [],
     		];
     
     		return view('pages/register')->withData($data);
     */
     $route = Helpers::routeinfo();
     $options = Helpers::options($route);
     $navs = Helpers::navigation($route, $options);
     $sub = Helpers::navigation($route, $options, true);
     $events = DB::table('conferences')->where('start_date', '>', Carbon\Carbon::now())->where('published', '>', '0000-00-00 00:00:00')->orderBy('start_date')->get();
 }