public function destroy($id) { if (is_array($id)) { Product::destroy($id); } else { Product::findOrFail($id)->delete(); } // redirect or whatever... }