/**
  * Run the database seeds.
  *
  * @return void
  */
 public function run()
 {
     $settings = Setting::all();
     $fields = array('language' => 'en');
     $settings->each(function ($setting) use($fields) {
         /**
          * Less on dreamsark Account
          */
         //            if ($setting->id == 2) return;
         $this->dispatch(new UpdateSettingCommand($setting->id, $fields));
     });
 }
예제 #2
0
 /**
  * Update the specified resource in storage.
  *
  * @param SettingEdition $request
  * @param Setting $setting
  * @return \Illuminate\Http\RedirectResponse
  */
 public function update(SettingEdition $request, Setting $setting)
 {
     $command = new UpdateSettingCommand($setting->getAttribute('id'), $request->all());
     $this->dispatch($command);
     return redirect()->back();
 }