コード例 #1
0
 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);
 }
 /**
  * Run the migrations.
  *
  * @return void
  */
 public function up()
 {
     //
     Schema::create('conferences', function (Blueprint $table) {
         $table->increments('id');
         $table->string('slug');
         $table->string('conference');
         $table->string('city');
         $table->string('state');
         $table->datetime('start_date');
         $table->timestamp('end_date');
         $table->string('timezone', 3)->nullable();
         $table->tinyInteger('coming')->default(0);
         $table->text('about')->nullable();
         $table->text('partners')->nullable();
         $table->string('venue_slug')->nullable();
         $table->text('sponsors')->nullable();
         $table->text('tags')->nullable();
         $table->text('options')->nullable();
         $table->string('hero')->nullable();
         $table->string('photo')->nullable();
         $table->timestamps();
         $table->timestamp('published')->nullable();
         $table->softDeletes();
     });
     Conference::create(['slug' => 'austin', 'conference' => 'Austin IT Strategies Conference', 'city' => 'Austin', 'state' => 'TX', 'start_date' => Carbon::create(2015, 9, 15, 7, 30, 0), 'end_date' => Carbon::create(2015, 9, 15, 16, 30, 0), 'timezone' => 'CDT', 'coming' => 'September 2015', 'about' => '<p>Our Austin IT Strategies Conference will bring together CIOs, CTOs SVPs &#038; VPs of IT, IT Directors and Sr. Level IT Leaders of fortune 100-5000 companies and equivalent healthcare, government and educational entities in the greater Austin Region.  Our attendee’s will have the opportunity to hear from Industry experts, network with their peers and discuss critical challenges and issues that they face within their organizations.  We encourage our attendee’s to share and discuss their lessons learned, knowledge and insight as we dive into some of today’s biggest IT challenges.</p><p>We strive to produce content-rich presentations that will provide answers to many of today’s business challenges and hope that you will be able to gain practical knowledge and insights that you can then use within your own organization.</p>', 'partners' => Helpers::serialize(['partners' => ['tagitm'], 'text' => '<p><strong>We are proud to be able to partner with TAGITM for the 2015 Austin IT Strategies Conference.</strong></p>']), 'venue_slug' => 'texas-austin-crown-plaza-austin', 'sponsors' => Helpers::serialize(['emerald' => ['cylance', 'dynatrace', 'forsythe', 'hitachi', 'workday', 'mcci', 'good', '2fa', 'nimble-storage', 'secure-nation', 'windstream', 'arbor-networks']]), 'tags' => 'austin-it-strategies-2015,austin,texas,it-strategies,information-technology,it-solutions', 'options' => Helpers::serialize(['link' => '0', 'hero' => true, 'title' => 'event:conference', 'jumbotron' => 'event:hero', 'countdown' => true, 'about' => true, 'partners' => true, 'agenda' => true, 'speakers' => true, 'sponsors' => true, 'sponsorlevels' => false, 'venue' => true]), 'hero' => '/images/conferences/austin.jpg', 'photo' => '/images/conferences/austin-portfolio.jpg', 'published' => Carbon::create(2015, 00, 28, 15, 05, 29)]);
     Conference::create(['slug' => 'san-antonio', 'conference' => 'San Antonio IT Strategies Conference', 'city' => 'San Antonio', 'state' => 'TX', 'start_date' => Carbon::create(2016, 5, 31, 0, 0, 0), 'end_date' => Carbon::create(2016, 5, 31, 23, 59, 59), 'timezone' => 'CDT', 'coming' => 1, 'about' => '<p>Our San Antonio IT Strategies Conference will bring together CIOs, CTOs SVPs &#038; VPs of IT, IT Directors and Sr. Level IT Leaders of fortune 100-5000 companies and equivalent healthcare, government and educational entities in the greater San Antonio Region.  Our attendee’s will have the opportunity to hear from Industry experts, network with their peers and discuss critical challenges and issues that they face within their organizations.  We encourage our attendee’s to share and discuss their lessons learned, knowledge and insight as we dive into some of today’s biggest IT challenges.</p><p>We strive to produce content-rich presentations that will provide answers to many of today’s business challenges and hope that you will be able to gain practical knowledge and insights that you can then use within your own organization.</p>', 'sponsors' => Helpers::serialize(['acclaim-events']), 'tags' => 'san-antonio,texas,it-strategies,information-technology,it-solutions', 'options' => Helpers::serialize(['link' => '0', 'title' => 'event:conference', 'jumbotron' => 'event:hero', 'countdown' => true, 'about' => true, 'partners' => false, 'agenda' => true, 'speakers' => false, 'sponsors' => false, 'sponsorlevels' => false, 'venue' => true]), 'hero' => '/images/conferences/san-antonio.jpg', 'photo' => '/images/conferences/san-antonio-portfolio.jpg', 'published' => Carbon::create(2015, 00, 28, 15, 05, 29)]);
     Conference::create(['slug' => 'tampa', 'conference' => 'Tampa IT Strategies Conference', 'city' => 'Tampa', 'state' => 'FL', 'start_date' => Carbon::create(2017, 2, 28, 0, 0, 0), 'end_date' => Carbon::create(2017, 2, 28, 12, 59, 59), 'timezone' => 'EST', 'coming' => 1, 'about' => '<p>Our Tampa IT Strategies Conference will bring together CIOs, CTOs SVPs &#038; VPs of IT, IT Directors and Sr. Level IT Leaders of fortune 100-5000 companies and equivalent healthcare, government and educational entities in the greater Tampa Region.  Our attendee’s will have the opportunity to hear from Industry experts, network with their peers and discuss critical challenges and issues that they face within their organizations.  We encourage our attendee’s to share and discuss their lessons learned, knowledge and insight as we dive into some of today’s biggest IT challenges.</p><p>We strive to produce content-rich presentations that will provide answers to many of today’s business challenges and hope that you will be able to gain practical knowledge and insights that you can then use within your own organization.</p>', 'sponsors' => Helpers::serialize(['acclaim-events']), 'tags' => 'tampa,florida,it-strategies,information-technology,it-solutions', 'options' => Helpers::serialize(['link' => '0', 'title' => 'event:conference', 'jumbotron' => 'event:hero', 'countdown' => true, 'about' => true, 'partners' => false, 'agenda' => true, 'speakers' => false, 'sponsors' => false, 'sponsorlevels' => false, 'venue' => true]), 'hero' => '/images/conferences/tampa.jpg', 'photo' => '/images/conferences/tampa-portfolio.jpg', 'published' => Carbon::create(2015, 00, 28, 15, 05, 29)]);
 }
コード例 #3
0
 /**
  * Create a Conference.
  *
  * @param  ConferenceRequest  $request
  * @return Response
  */
 public function store(ConferenceRequest $request)
 {
     try {
         $user = $this->getUser($request);
         $conference = Conference::create($request->all());
         $conference->managers()->attach($user);
         $this->addActivity($user->getKey(), 'requested', $conference->getKey(), 'conference');
         return response()->success();
     } catch (Exception $e) {
         return response()->error();
     }
 }
コード例 #4
0
 /**
  * Run the database seeds.
  *
  * @return void
  */
 public function run()
 {
     // ---------------------------------------------------------------------
     // CONFERENCE 1
     // ---------------------------------------------------------------------
     $conference = ['name' => 'India Conference', 'description' => 'A conference in India.', 'start_date' => '2016-03-01', 'end_date' => '2016-03-31', 'address' => 'Sansad Marg, Connaught Place, New Delhi, Delhi 110001, India', 'city' => 'New Delhi', 'country' => 'India', 'capacity' => 1000, 'status' => 'approved'];
     $conference = Conference::create($conference);
     $event = ['name' => 'Opening Ceremony', 'description' => 'Welcome!', 'facilitator' => 'TBD', 'date' => '2016-05-01', 'start_time' => '09:00:00', 'end_time' => '10:00:00', 'address' => 'Sansad Marg, Connaught Place, New Delhi, Delhi 110001, India', 'city' => 'New Delhi', 'country' => 'India', 'capacity' => 1000, 'status' => 'approved'];
     $event = new Event($event);
     $event->conference()->associate($conference);
     $event->save();
     // ---------------------------------------------------------------------
     // CONFERENCE 2
     // ---------------------------------------------------------------------
     $conference = ['name' => 'Canada Conference', 'description' => 'A conference in Canada.', 'start_date' => '2016-05-11', 'end_date' => '2016-05-20', 'address' => '1055 Canada Pl, Vancouver, BC V6C 0C3, Canada', 'city' => 'Vancouver', 'country' => 'Canada', 'capacity' => 1000, 'status' => 'approved'];
     $conference = Conference::create($conference);
     $event = ['name' => 'Opening Ceremony', 'description' => 'Welcome!', 'facilitator' => 'TBD', 'date' => '2016-05-11', 'start_time' => '09:00:00', 'end_time' => '10:00:00', 'address' => '1055 Canada Pl, Vancouver, BC V6C 0C3, Canada', 'city' => 'Vancouver', 'country' => 'Canada', 'capacity' => 1000, 'status' => 'approved'];
     $event = new Event($event);
     $event->conference()->associate($conference);
     $event->save();
     // ---------------------------------------------------------------------
     // CONFERENCE 3
     // ---------------------------------------------------------------------
     $conference = ['name' => 'France Conference', 'description' => 'A conference in France.', 'start_date' => '2016-05-21', 'end_date' => '2016-05-30', 'address' => '17 Boulevard Saint-Jacques, Paris 75014, France', 'city' => 'Paris', 'country' => 'France', 'capacity' => 1000, 'status' => 'approved'];
     $conference = Conference::create($conference);
     $event = ['name' => 'Opening Ceremony', 'description' => 'Welcome!', 'facilitator' => 'TBD', 'date' => '2016-05-21', 'start_time' => '09:00:00', 'end_time' => '10:00:00', 'address' => '17 Boulevard Saint-Jacques, Paris 75014, France', 'city' => 'Paris', 'country' => 'France', 'capacity' => 1000, 'status' => 'approved'];
     $event = new Event($event);
     $event->conference()->associate($conference);
     $event->save();
     // ---------------------------------------------------------------------
     // CONFERENCE 4
     // ---------------------------------------------------------------------
     $conference = ['name' => 'CPSC 319 Final Demos', 'description' => 'Teams present their projects.', 'start_date' => '2016-03-31', 'end_date' => '2016-04-07', 'address' => 'Hugh Dempster Pavilion, 6245 Agronomy Road, Vancouver, BC V6T 1Z4', 'city' => 'Vancouver', 'country' => 'Canada', 'capacity' => 100, 'status' => 'approved'];
     $conference = Conference::create($conference);
     $event = ['name' => 'Project 2 Final Demos', 'description' => 'Teams 5 to 8 present their projects.', 'facilitator' => 'Dr Ahmed Awad', 'date' => '2016-03-31', 'start_time' => '12:30:00', 'end_time' => '14:00:00', 'address' => 'Hugh Dempster Pavilion, 6245 Agronomy Road, Vancouver, BC V6T 1Z4', 'city' => 'Vancouver', 'country' => 'Canada', 'capacity' => 100, 'status' => 'approved'];
     $event = new Event($event);
     $event->conference()->associate($conference);
     $event->save();
     $event = ['name' => 'Project 3 Final Demos', 'description' => 'Teams 9 to 12 present their projects.', 'facilitator' => 'Dr Ahmed Awad', 'date' => '2016-04-05', 'start_time' => '12:30:00', 'end_time' => '14:00:00', 'address' => 'Hugh Dempster Pavilion, 6245 Agronomy Road, Vancouver, BC V6T 1Z4', 'city' => 'Vancouver', 'country' => 'Canada', 'capacity' => 100, 'status' => 'pending'];
     $event = new Event($event);
     $event->conference()->associate($conference);
     $event->save();
     $event = ['name' => 'Project 1 Final Demos', 'description' => 'Teams 1 to 4 present their projects.', 'facilitator' => 'Dr Ahmed Awad', 'date' => '2016-04-07', 'start_time' => '12:30:00', 'end_time' => '14:00:00', 'address' => 'Hugh Dempster Pavilion, 6245 Agronomy Road, Vancouver, BC V6T 1Z4', 'city' => 'Vancouver', 'country' => 'Canada', 'capacity' => 100, 'status' => 'pending'];
     $event = new Event($event);
     $event->conference()->associate($conference);
     $event->save();
 }