/**
  * Run the database seeds.
  *
  * @return void
  */
 public function run()
 {
     //
     $benefit = Benefit::where('text', 'like', '%Fortune 100-5000%')->get();
     if (is_array($benefit) && count($benefit) > 0 && isset($benefit[0]->text)) {
         $text = str_replace('fortune 100-5000', 'Fortune 100-3000', $benefit[0]->text);
         $text = str_replace('ΓÇÖ', "'", $text);
         $update = Benefit::where('text', 'like', '%Fortune 100-5000%')->update(['text' => $text]);
     }
     $events = Conference::where('about', 'like', '%Fortune 100-5000%')->get();
     foreach ($events as $event) {
         unset($text);
         $text = str_replace('fortune 100-5000', 'Fortune 100-3000', $event->about);
         $text = str_replace('ΓÇÖ', "'", $text);
         Conference::where('slug', '=', $event->slug)->where('about', 'like', '%Fortune 100-5000%')->update(['about' => $text]);
     }
 }
 /**
  * Run the migrations.
  *
  * @return void
  */
 public function up()
 {
     //
     Schema::create('benefits', function (Blueprint $table) {
         $table->increments('id');
         $table->string('title');
         $table->text('text');
         $table->integer('priority');
         $table->tinyInteger('reason')->default(1);
         $table->timestamps();
         $table->timestamp('published')->nullable();
         $table->softDeletes();
     });
     Benefit::create(['title' => 'Intro', 'text' => 'Our attendee’s consist of CIOs, CTOs SVPs & VPs of IT, IT Directors and Sr. Level IT Executives of fortune 100-5000 companies and equivalent healthcare, government, Financial and educational organizations. We will have multiple vertical markets represented at the event, including retail, manufacturing, financial, insurance, healthcare, education, and local and state government entities.', 'priority' => 0, 'reason' => 0, 'published' => Carbon::create(2015, 00, 28, 15, 05, 29)]);
     Benefit::create(['title' => 'Networking', 'text' => 'Networking is what makes our events work. Many of your peers have faced similar challenges to ones that you may currently be working with. Being able to draw from their experiences, expertise and hearing what worked and what did not, can provide valuable insight as to the next steps or solution that you use.', 'priority' => 1, 'published' => Carbon::create(2015, 00, 28, 15, 05, 29)]);
     Benefit::create(['title' => 'Event Topics', 'text' => 'We work to ensure that our topics are current and address critical challenges and issues being faced by local IT Professionals in the community. The topics are then reviewed throughout the year to ensure that they are current, on point and appropriately address the needs of our Executive level IT audience.', 'priority' => 2, 'published' => Carbon::create(2015, 00, 28, 15, 05, 29)]);
     Benefit::create(['title' => 'Panels & Presenters', 'text' => 'Our Panelists & Presenters will consist of IT Leaders from the local community and Industry Experts who are knowledgeable, passionate and can bring value to the topics being discussed.', 'priority' => 3, 'published' => Carbon::create(2015, 00, 28, 15, 05, 29)]);
     Benefit::create(['title' => 'Our Partners', 'text' => 'In each region, we align ourselves with local IT Support Groups, User Groups and IT Professionals who are working to promote IT to the local Community. We encourage you to network with these groups at the event and get involved as they have a big impact on promoting IT throughout the local community.', 'priority' => 4, 'published' => Carbon::create(2015, 00, 28, 15, 05, 29)]);
 }
Example #3
0
 public static function store($request, $id = null)
 {
     $benefit = null;
     if ($id == null) {
         $benefit = new Benefit();
     } else {
         $benefit = Benefit::find($id);
     }
     $client = Session::get('current_client');
     if ($client) {
         $benefit->client_id = $client["id"];
     }
     $benefit->vendor_id = $request->input("vendor");
     $benefit->benefit_type_id = $request->input("benefit_type");
     $benefit->carrier_name = $request->input("carrier_name", "");
     $benefit->carrier_address1 = $request->input("address1", "");
     $benefit->carrier_address2 = $request->input("address2", "");
     $benefit->carrier_city = $request->input("city", "");
     $benefit->carrier_state = $request->input("state", "");
     $benefit->carrier_zipcode = $request->input("zipcode", "");
     $benefit->carrier_phone1 = $request->input("phone", "");
     $benefit->carrier_phone2 = $request->input("phone_alt", "");
     $benefit->carrier_onboarding_email = $request->input("email_onboard", "");
     $benefit->carrier_termination_email = $request->input("email_termination", "");
     $benefit->onboarding_broker_approval = $request->input("onboard_email_approval", "");
     $benefit->termination_broker_approval = $request->input("email_termination_approval", "");
     $benefit->group_number = $request->input("group_num", "");
     $benefit->account_number = $request->input("acct_num", "");
     $benefit->start_date = Utils::convertToDateFormat($request->input("policy_start_date", ""));
     $benefit->renewal_date = Utils::convertToDateFormat($request->input("policy_renewal_date", ""));
     $benefit->new_hire_waiting_period = $request->input("waiting_period", "");
     $benefit->plan_name = $request->input("plan_name", "");
     $benefit->carrier_website = $request->input("carrier_website", "");
     $benefit->save();
     return $benefit;
 }
 /**
  * Remove the specified resource from storage.
  *
  * @param  int $id
  * @return Response
  */
 public function destroy($id)
 {
     $benefit = Benefit::find($id);
     if ($benefit) {
         $benefit->delete();
     }
     return back();
 }