/** * Update the specified resource in storage. * * @param \Illuminate\Http\Request $request * @param int $id * @return \Illuminate\Http\Response */ public function update(Request $request, $id) { // where id = $id $update = Billboard::findOrFail($id); // proses update data ke database $update->nama = Input::get('nama'); $update->lokasi = Input::get('lokasi'); $update->latitude = Input::get('latitude'); $update->longitude = Input::get('longitude'); $update->ukuran = Input::get('ukuran'); $update->status = Input::get('status'); $update->view = Input::get('view'); $update->fasilitas = Input::get('fasilitas'); // $update->gambar=Input::get('gambar'); // save hasil input $update->save(); return Redirect('billboardList'); }
/** * Remove the specified resource from storage. * * @param int $id * @return \Illuminate\Http\Response */ public function destroy($id) { // Delete Billboard Billboard::destroy($id); return Redirect('billboardList'); }
/** * Remove the specified resource from storage. * * @param int $id * @return \Illuminate\Http\Response */ public function destroy($id) { $data = Billboard::findOrFail($id); Billboard::find($id)->delete(); Session::flash('message', 'Data Berhasil Dihapus'); return Redirect::to('billboardList'); }
/** * Display the specified resource. * * @param int $id * @return \Illuminate\Http\Response */ public function show($id) { $detail = Billboard::findOrFail($id); // page1/1000 error 404 not found return view('billboardList', compact('detail')); }
$url = 'http://*****:*****@aboutUs'); // Route::get('page1/{$id}','halamanController@show') // tampilin data hanya yang id nya 2