UserCertifyApplyNotification.php 796 Bytes
<?php

namespace App\Notifications;

use App\Models\User;
use App\Models\UserCertify;
use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Notifications\Notification;

class UserCertifyApplyNotification extends Notification implements ShouldQueue
{
    use Queueable;

    public UserCertify $userCertify;

    public User $applyUser;

    /**
     * Create a new notification instance.
     *
     * @return void
     */
    public function __construct(UserCertify $userCertify)
    {
        $this->userCertify = $userCertify;
        $this->applyUser   = $userCertify->getAttribute('user');
    }

    /**
     * Get the notification's delivery channels.
     *
     * @return array
     */
    public function via(): array
    {
        return [];
    }
}