Skip to content

Commit

Permalink
delete user of customer
Browse files Browse the repository at this point in the history
  • Loading branch information
denisdulici committed Jun 5, 2020
1 parent 99f6fd8 commit 90aa0f4
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions app/Jobs/Common/DeleteContact.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -30,6 +31,10 @@ public function handle()
{
$this->authorize();

if ($user = $this->contact->user) {
$this->dispatch(new DeleteUser($user));
}

$this->contact->delete();

return true;
Expand Down

0 comments on commit 90aa0f4

Please sign in to comment.