public function destroy(Contactcompany $contactcompany) { if (is_integer($contactcompany)) { $contactcompany = Contactcompany::find($contactcompany); } $contactcompany->delete(); Flash::success('Contactcompany has been created Deleted!'); return Redirect::back(); }
public function destroy($contactcompany) { $contactcompany = Contactcompany::find($contactcompany); $contactcompany->delete(); return response(['data' => true, 'status' => 'success', 'message' => 'successfully deleted']); }