use App\Notifications\NotifyAuthorOfUnavailablePackageUrl;
use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Foundation\Bus\Dispatchable;
use Illuminate\Queue\InteractsWithQueue;
use Illuminate\Queue\SerializesModels;
class CheckPackageUrlsForAvailability implements ShouldQueue
{
use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;
public function handle()
{
if ($this->package->author && $this->package->authorIsUser()) {
$this->package->author->user->notify(new NotifyAuthorOfUnavailablePackageUrl($this->package));
}
}
}