Categorias

This commit is contained in:
2021-07-12 16:52:59 -04:00
parent 4766b56062
commit c0fdba3072
7 changed files with 163 additions and 31 deletions

View File

@@ -98,6 +98,7 @@ class RestaurantesController extends Controller {
if($restaurant->canalesVenta()->count() > 0) throw new CantDeleteHasChildException("restaurant", "canal_venta");
if($restaurant->sectores()->count() > 0) throw new CantDeleteHasChildException("restaurant", "sector");
if($restaurant->zonasProduccion()->count() > 0) throw new CantDeleteHasChildException("restaurant", "zona_produccion");
if($restaurant->categorias()->count() > 0) throw new CantDeleteHasChildException("restaurant", "categoria");
$restaurant->delete();