Exemplo n.º 1
0
 public function updateSelected(Request $request)
 {
     $infoColl = info::where('name', $request->input('name'))->limit(1)->get();
     echo $infoColl[0] . '<br>';
     $infoColl[0]->update($request->all());
     return redirect('/');
 }
Exemplo n.º 2
0
 public function contactId($id)
 {
     $info = info::where('name', 'contact')->limit(1)->get()[0];
     $helps = help::all();
     $events = event::all();
     $services = service::all();
     $checkServiceArray = eventServices::where('event_id', $id)->get();
     $checkService;
     $currEvent = event::find($id);
     foreach ($checkServiceArray as $check) {
         $checkService[] = $check->service_id;
     }
     if (!empty($currEvent)) {
         return view('pages.contact', compact('helps', 'events', 'services', 'checkService', 'currEvent', 'info'));
     }
     return redirect('/contact');
 }
Exemplo n.º 3
0
 public function index()
 {
     $info = info::where('name', 'agreement')->limit(1)->get()[0];
     $agreements = agreement::all();
     return view('agreement.index', compact('agreements', 'info'));
 }
Exemplo n.º 4
0
 public function __construct()
 {
     $this->middleware('Admin', ['except' => ['index', 'show']]);
     $this->info = info::where('name', 'services')->get()[0];
 }