Merge pull request #1469 from denisdulici/master

Not deleting user related to customer
This commit is contained in:
Denis Duliçi 2020-06-05 16:06:10 +03:00 committed by GitHub
commit c1fd4a35e2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -3,6 +3,7 @@
namespace App\Jobs\Common;
use App\Abstracts\Job;
use App\Jobs\Auth\DeleteUser;
use App\Traits\Contacts;
class DeleteContact extends Job
@ -30,6 +31,10 @@ class DeleteContact extends Job
{
$this->authorize();
if ($user = $this->contact->user) {
$this->dispatch(new DeleteUser($user));
}
$this->contact->delete();
return true;