Return early if no client present in the repository

This commit is contained in:
David Bomba 2021-11-21 14:52:48 +11:00
parent ff6f3fc89c
commit d9961bb529

View File

@ -176,7 +176,7 @@ class BaseRepository
if(array_key_exists('client_id', $data))
$model->client_id = $data['client_id'];
$client = Client::where('id', $model->client_id)->withTrashed()->first();
$client = Client::where('id', $model->client_id)->withTrashed()->firstOrFail();
$state = [];