Update Customer.php
This commit is contained in:
parent
8fdc45d799
commit
f0daf32258
1 changed files with 0 additions and 1 deletions
|
@ -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;
|
||||||
|
|
Loading…
Reference in a new issue