Ejemplo n.º 1
0
 /**
  * Update the specified resource in storage.
  *
  * @param  \Illuminate\Http\Request  $request
  * @param  int  $id
  * @return \Illuminate\Http\Response
  */
 public function update(Request $request, $id)
 {
     $banco = Bank::findOrFail($id);
     $data = $request->all();
     $this->validate($request, Bank::$rules);
     $banco->update($data);
     return redirect()->route('admin.bancos.index')->with('message', '<div class="alert alert-success" style="margin-top:15px">Banco editado con Éxito</div>');
 }
Ejemplo n.º 2
0
 /**
  * Update the specified resource in storage.
  *
  * @param  int $id
  * @return Response
  */
 public function update($id, BankRequest $request)
 {
     $bank = Bank::findOrFail($id);
     $bank->update($request->all());
     $this->syncHouses($bank, $request->input('house_list'));
     session()->flash('flash_message', 'Bank successfully updated!');
     return redirect('bank');
 }
Ejemplo n.º 3
0
 public function show($alpha2, $id)
 {
     $links[1] = 'active';
     try {
         $bank = Bank::findOrFail($id);
         $country = Country::findOrFail($alpha2);
     } catch (ModelNotFoundException $ex) {
         return view('errors.404');
     }
     return view('bank.show', ['bank' => $bank, 'country' => $country, 'links' => $links]);
 }
 /**
  * Display the specified resource.
  *
  * @param  int $id
  * @return Response
  */
 public function getShowproduct($id)
 {
     $bank = Bank::findOrFail($id);
     return view('admin.showproduct', compact('bank'));
 }