/** * Remove the specified resource from storage. * * @param int $id * @return Response */ public function destroy($id) { if (!$id) { return Redirect::route('types.index')->with('error', 'Please provide type id'); } $type = Types::find($id); if (empty($type)) { return Redirect::route('types.index')->with('error', 'Type not found'); } Types::destroy($id); return Redirect::route('types.index')->with('success', 'Type deleted successfully'); }