laravel-liberu /
genealogy
| 1 | <?php |
||||
| 2 | |||||
| 3 | namespace App\Notifications; |
||||
| 4 | |||||
| 5 | use Illuminate\Bus\Queueable; |
||||
| 6 | use Illuminate\Notifications\Messages\MailMessage; |
||||
| 7 | use Illuminate\Notifications\Notification; |
||||
| 8 | |||||
| 9 | class SubscribeSuccessfully extends Notification |
||||
| 10 | { |
||||
| 11 | use Queueable; |
||||
| 12 | |||||
| 13 | protected $plan; |
||||
| 14 | |||||
| 15 | /** |
||||
| 16 | * Create a new notification instance. |
||||
| 17 | * |
||||
| 18 | * @return void |
||||
| 19 | */ |
||||
| 20 | public function __construct($plan_id) |
||||
| 21 | { |
||||
| 22 | $stripe = new \Stripe\StripeClient(\Config::get('services.stripe.secret')); |
||||
| 23 | $this->plan = is_array($plan_id) ? $stripe->plans->retrieve($plan_id['planId']) : $stripe->plans->retrieve($plan_id); |
||||
| 24 | } |
||||
| 25 | |||||
| 26 | /** |
||||
| 27 | * Get the notification's delivery channels. |
||||
| 28 | * |
||||
| 29 | * @return array |
||||
| 30 | */ |
||||
| 31 | public function via(mixed $notifiable) |
||||
|
0 ignored issues
–
show
|
|||||
| 32 | { |
||||
| 33 | return ['mail']; |
||||
| 34 | } |
||||
| 35 | |||||
| 36 | /** |
||||
| 37 | * Get the mail representation of the notification. |
||||
| 38 | * |
||||
| 39 | * @return \Illuminate\Notifications\Messages\MailMessage |
||||
| 40 | */ |
||||
| 41 | public function toMail(mixed $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. Loading history...
|
|||||
| 42 | { |
||||
| 43 | return (new MailMessage()) |
||||
| 44 | ->subject('subscribed Successfully!') |
||||
| 45 | ->line('You have subscribed successfully!') |
||||
| 46 | ->line('Subscription Plan:'.$this->plan->nickname) |
||||
| 47 | ->line('Thank you for using Genealogia!'); |
||||
| 48 | } |
||||
| 49 | |||||
| 50 | /** |
||||
| 51 | * Get the array representation of the notification. |
||||
| 52 | * |
||||
| 53 | * @return array |
||||
| 54 | */ |
||||
| 55 | public function toArray(mixed $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. Loading history...
|
|||||
| 56 | { |
||||
| 57 | return [ |
||||
| 58 | |||||
| 59 | ]; |
||||
| 60 | } |
||||
| 61 | } |
||||
| 62 |
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.