public function getEdit($id = 0) { if ($id == 0) { return \Response::view('errors.500'); } $contribution = Contribution::find($id); $lawyer = Lawyer::find($contribution->lawyer_id); return view('contributions.edit', compact('contribution', 'lawyer')); }
public function deleteItem($id) { $lawyer = Lawyer::find($id); $lawyer->identification = $id; $lawyer->registration_number = $id; $lawyer->save(); $lawyer->delete(); return response()->json(["mensaje" => "ok"]); }