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