Esempio n. 1
0
 public function handle(UserRepository $user_repo, SettingRepository $setting_repo)
 {
     $sample = $this->sample;
     $users = $user_repo->getAll();
     $settings = $setting_repo->getWithSlugKeys();
     foreach ($users as $user) {
         Mail::send('mail.notify_admin_of_new_sample', ['sample' => $sample, 'settings' => $settings], function ($m) use($sample, $user) {
             $m->to($user->email, $user->name)->subject('Anmeldung Probe ' . $sample->generated_number);
         });
     }
 }
Esempio n. 2
0
 public function getList(Request $request, SettingRepository $settings)
 {
     $justAddedSample = false;
     $justAddedSampleText = '';
     if ($request->session()->get('customer.justaddedsample')) {
         $setting = $settings->getBySlug('info_sample_submission');
         $justAddedSampleText = $setting->text;
         $justAddedSample = true;
         $request->session()->forget('customer.justaddedsample');
     }
     return view('website.customer.samples.list')->with(['browserTitle' => trans_choice('sample.sample', 2), 'mainArea' => 'samples', 'subArea' => 'list', 'justAddedSample' => $justAddedSample, 'justAddedSampleText' => $justAddedSampleText, 'customer' => $this->customer->getByToken()]);
 }
 /**
  * Remove the specified resource from storage.
  *
  * @param  int  $id
  * @return \Illuminate\Http\Response
  */
 public function destroy($id, DestroySettingRequest $request)
 {
     $result = $this->setting->destroySetting($request);
     if (!$result) {
         return redirect()->back()->with('status', 'destroy-error');
     }
     Event::fire(new SettingsWereModified());
     return redirect()->back()->with('status', 'destroy-success');
 }
 /**
  * Display a listing of the resource.
  *
  * @return Response
  */
 public function index()
 {
     $settings = Setting::all();
     $settings = SettingRepository::settingsFormat($settings);
     return view('settings', compact('settings'));
 }