/** * Display the specified resource. * * @param int $id * @return \Illuminate\Http\Response */ public function show(Request $req) { $stato = $req->input("val"); $var = marker::get(); return view("mostraimmagini")->with("mlista", $var)->with("val", $stato); }
public function index() { $val = marker::get(); $ultimi = marker::select('Marker.nome_luogo as nomeluogo', 'Marker.latitudine as lat', 'Marker.longitudine as lng', 'users.name as nomeutente')->join('users', 'Marker.id_utente', '=', 'users.id')->orderby('Marker.id', 'desc')->limit(5)->get(); return view("dashboard")->with('lista', $val)->with('ultimi', $ultimi); }
/** * Remove the specified resource from storage. * * @param int $id * @return \Illuminate\Http\Response */ public function destroy(Request $req) { $id = $req->input("id"); $riga = marker::find($id); $riga->delete(); return redirect()->intended("/amministrazione/modificamarker?val=3"); }