1 | <?php |
||||
2 | |||||
3 | namespace FaithGen\SDK\Notifications\Ministry; |
||||
4 | |||||
5 | use FaithGen\SDK\Models\Ministry; |
||||
6 | use Illuminate\Bus\Queueable; |
||||
7 | use Illuminate\Contracts\Queue\ShouldQueue; |
||||
8 | use Illuminate\Notifications\Messages\MailMessage; |
||||
9 | use Illuminate\Notifications\Notification; |
||||
10 | |||||
11 | class AccountCreated extends Notification implements ShouldQueue |
||||
12 | { |
||||
13 | use Queueable; |
||||
14 | /** |
||||
15 | * @var Ministry |
||||
16 | */ |
||||
17 | private $ministry; |
||||
18 | |||||
19 | /** |
||||
20 | * Create a new notification instance. |
||||
21 | * |
||||
22 | * @param Ministry $ministry |
||||
23 | */ |
||||
24 | public function __construct(Ministry $ministry) |
||||
25 | { |
||||
26 | // |
||||
27 | $this->ministry = $ministry; |
||||
28 | } |
||||
29 | |||||
30 | /** |
||||
31 | * Get the notification's delivery channels. |
||||
32 | * |
||||
33 | * @param mixed $notifiable |
||||
34 | * @return array |
||||
35 | */ |
||||
36 | public function via($notifiable) |
||||
0 ignored issues
–
show
|
|||||
37 | { |
||||
38 | return ['mail']; |
||||
39 | } |
||||
40 | |||||
41 | /** |
||||
42 | * Get the mail representation of the notification. |
||||
43 | * |
||||
44 | * @param mixed $notifiable |
||||
45 | * @return \Illuminate\Notifications\Messages\MailMessage |
||||
46 | */ |
||||
47 | public function toMail($notifiable) |
||||
0 ignored issues
–
show
The parameter
$notifiable is not used and could be removed.
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
This check looks for parameters that have been defined for a function or method, but which are not used in the method body. ![]() |
|||||
48 | { |
||||
49 | $url = url('/auth/activate/'.$this->ministry->id.'/'.$this->ministry->activation->code); |
||||
50 | |||||
51 | return (new MailMessage) |
||||
52 | ->greeting('Hello '.$this->ministry->name) |
||||
53 | ->subject('FaithGen account created!') |
||||
54 | ->from('[email protected]', 'Faith Gen') |
||||
55 | ->line('We have received your account registration request, please just activate your account to get started with us') |
||||
56 | ->action('Activate account', $url) |
||||
57 | ->line('Thank you for using our application!'); |
||||
58 | } |
||||
59 | |||||
60 | /** |
||||
61 | * Get the array representation of the notification. |
||||
62 | * |
||||
63 | * @param mixed $notifiable |
||||
64 | * @return array |
||||
65 | */ |
||||
66 | public function toArray($notifiable) |
||||
0 ignored issues
–
show
The parameter
$notifiable is not used and could be removed.
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
This check looks for parameters that have been defined for a function or method, but which are not used in the method body. ![]() |
|||||
67 | { |
||||
68 | return [ |
||||
69 | // |
||||
70 | ]; |
||||
71 | } |
||||
72 | } |
||||
73 |
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.