Linux server.jmdstrack.com 3.10.0-1160.119.1.el7.tuxcare.els10.x86_64 #1 SMP Fri Oct 11 21:40:41 UTC 2024 x86_64
/ home/ jmdstrac/ public_html/ sabc/ app/ Notifications/ |
|
<?php namespace App\Notifications; use Illuminate\Bus\Queueable; use Illuminate\Notifications\Notification; use Illuminate\Contracts\Queue\ShouldQueue; use Illuminate\Notifications\Messages\MailMessage; class AuthorPostApproved extends Notification implements ShouldQueue { use Queueable; public $post; /** * Create a new notification instance. * * @return void */ public function __construct($post) { $this->post = $post; } /** * Get the notification's delivery channels. * * @param mixed $notifiable * @return array */ public function via($notifiable) { return ['mail']; } /** * Get the mail representation of the notification. * * @param mixed $notifiable * @return \Illuminate\Notifications\Messages\MailMessage */ public function toMail($notifiable) { return (new MailMessage) ->subject('Your Post Successfully Approved') ->greeting('Hello, ' .$this->post->user->name . ' ! ') ->line('Your post has been successfully approved') ->line('Post title : ' .$this->post->title) ->action('view', url(route('author.post.show' , $this->post->id))) ->line('Thank you for using our application!'); } /** * Get the array representation of the notification. * * @param mixed $notifiable * @return array */ public function toArray($notifiable) { return [ // ]; } }