Exemplo n.º 1
0
 public function update(Request $request, $id)
 {
     $kami = Kami::findOrFail($id);
     $data['deskripsi'] = $request->deskripsi;
     if ($request->hasFile('image')) {
         $data['gambar_kami'] = $this->savePhoto($request->file('image'));
     }
     if ($kami->update($data)) {
         \Flash::success('Tentang Kami Berhasil Diupdate');
     } else {
         \Flash::info('Tentang Kami Gagal Diupdate');
     }
     return redirect('admin/kami');
 }
Exemplo n.º 2
0
 public function kami()
 {
     $data = array('kami' => Kami::all()->first(), 'brand' => Brand::all(), 'cart' => Cart::content(), 'total' => Cart::total(), 'download' => Download::limit(3)->offset(0)->get(), 'testimoni' => Testimoni::limit(10)->offset(0)->get());
     return view('front.kami', compact('data'));
 }