Changeset View
Changeset View
Standalone View
Standalone View
src/app/Jobs/DomainDelete.php
- This file was copied from src/app/Jobs/UserDelete.php.
<?php | <?php | ||||
namespace App\Jobs; | namespace App\Jobs; | ||||
use App\Backends\LDAP; | |||||
use App\Domain; | |||||
use Illuminate\Bus\Queueable; | use Illuminate\Bus\Queueable; | ||||
use Illuminate\Queue\SerializesModels; | |||||
use Illuminate\Queue\InteractsWithQueue; | |||||
use Illuminate\Contracts\Queue\ShouldQueue; | use Illuminate\Contracts\Queue\ShouldQueue; | ||||
use Illuminate\Foundation\Bus\Dispatchable; | use Illuminate\Foundation\Bus\Dispatchable; | ||||
use Illuminate\Queue\SerializesModels; | |||||
use Illuminate\Queue\InteractsWithQueue; | |||||
class UserDelete implements ShouldQueue | class DomainDelete implements ShouldQueue | ||||
{ | { | ||||
use Dispatchable; | use Dispatchable; | ||||
use InteractsWithQueue; | use InteractsWithQueue; | ||||
use Queueable; | use Queueable; | ||||
use SerializesModels; | use SerializesModels; | ||||
protected $user; | protected $domain; | ||||
public $tries = 5; | public $tries = 5; | ||||
/** @var bool Delete the job if its models no longer exist. */ | /** @var bool Delete the job if its models no longer exist. */ | ||||
public $deleteWhenMissingModels = true; | public $deleteWhenMissingModels = true; | ||||
/** | /** | ||||
* Create a new job instance. | * Create a new job instance. | ||||
* | * | ||||
* @param \App\User $user The user to delete. | * @param Domain $domain The domain to delete. | ||||
* | * | ||||
* @return void | * @return void | ||||
*/ | */ | ||||
public function __construct(\App\User $user) | public function __construct(Domain $domain) | ||||
{ | { | ||||
$this->user = $user; | $this->domain = $domain; | ||||
} | } | ||||
/** | /** | ||||
* Execute the job. | * Execute the job. | ||||
* | * | ||||
* @return void | * @return void | ||||
*/ | */ | ||||
public function handle() | public function handle() | ||||
{ | { | ||||
// | LDAP::deleteDomain($this->domain); | ||||
} | } | ||||
} | } |