title: email notification in laravel 5.5 i get this error ```Trying to access array offset on value of type null```
body: <p>i want to get email notification each time a new user is registered but after creating <code>php artisan make:notification Taskcompleted</code> and added <code>Notification::route('mail','admin@gmail.com')-&gt;notify(new TaskCompleted());</code> like this in my contoller</p>
  <pre><code>public function store(Request $request){
          $employee = request()-&gt;validate([
              'employee_id' =&gt; 'required|max:250',
              'name' =&gt; 'required|max:100',
              'place_of_birth' =&gt; 'nullable|max:100',]);
  Notification::route('mail','admin@gmail.com')-&gt;notify(new TaskCompleted());
  </code></pre>
  <p>i keep getting this error
  <code>Trying to access array offset on value of type null</code> i have imported the necessary class and configured my .env file with mailtrap,still yet same error</p>
  <p>taskcompleted file</p>
  <pre><code>&lt;?php
  
  namespace App\Notifications;
  
  use Illuminate\Bus\Queueable;
  use Illuminate\Notifications\Notification;
  use Illuminate\Contracts\Queue\ShouldQueue;
  use Illuminate\Notifications\Messages\MailMessage;
  
  class TaskCompleted extends Notification
  {
      use Queueable;
  
      /**
       * Create a new notification instance.
       *
       * @return void
       */
      public function __construct()
      {
          //
      }
  
      /**
       * 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)
                      -&gt;line('The introduction to the notification.')
                      -&gt;action('Notification Action', url('/'))
                      -&gt;line('Thank you for using our application!');
      }
  
      /**
       * Get the array representation of the notification.
       *
       * @param  mixed  $notifiable
       * @return array
       */
      public function toArray($notifiable)
      {
          return [
              //
          ];
      }
  }
  </code></pre>