<?php namespace App\Notifications; use Illuminate\Bus\Queueable; use Illuminate\Contracts\Queue\ShouldQueue; use Illuminate\Notifications\Notification; use Illuminate\Notifications\Messages\MailMessage; class CompanyNotification extends Notification implements ShouldQueue {use Queueable; public function __construct(public string $subject,public string $message){} public function via($n):array{return ['database','mail'];} public function toDatabase($n):array{return ['subject'=>$this->subject,'message'=>$this->message];} public function toMail($n):MailMessage{return (new MailMessage)->subject($this->subject)->line($this->message);}}