Update Customer.php

This commit is contained in:
Bozhidar Slaveykov 2024-04-04 16:47:39 +03:00
parent 8fdc45d799
commit f0daf32258

View file

@ -35,7 +35,6 @@ class Customer extends Model
static::deleting(function ($model) { static::deleting(function ($model) {
$findWebsites = Website::where('customer_id', $model->id)->count(); $findWebsites = Website::where('customer_id', $model->id)->count();
$findWebsites = 5;
if ($findWebsites > 0) { if ($findWebsites > 0) {
throw new \ErrorException('Customer has websites, please delete them first.'); throw new \ErrorException('Customer has websites, please delete them first.');
return false; return false;