/** * Display the specified resource. * * @param int $id * @return Response */ public function show($id) { $fiche = fiche::findOrFail($id); if (Auth::user()->id === 1 || Auth::user()->id === 0) { $fich_act = fich_act::where("id_fiche", "=", $id)->get(); } else { $fich_act = fich_act::where("id_fiche", "=", $id)->where("id_coach", "=", Auth::user()->id)->get(); } return view('fiche.show', compact('fiche', 'fich_act')); }
/** * Remove the specified resource from storage. * * @param int $id * @return Response */ public function destroy($id) { fich_act::destroy($id); Session::flash('flash_message', 'fich_act successfully deleted!'); return redirect('fich_act'); }