title: How to call custom made function usin via parameter in laravel notification?
body: <p>devs,I am using laravel 8 I create a notification inside that I made my own funciton toTwilio mention below code.</p>
  <p>Problem: how can I call that function. I include in return parameter of via() function
  but it shows me &quot;driver [twilio] not supported.&quot;. I do not register anything
  anywhere. and I tried to change the name of function still showing error
  &quot;driver[&lt;fun_name&gt;] not supported.</p>
  <pre><code>
  &lt;?php
  
  namespace App\Notifications;
  
  use Illuminate\Bus\Queueable;
  use Illuminate\Contracts\Queue\ShouldQueue;
  use Illuminate\Notifications\Messages\MailMessage;
  use Illuminate\Notifications\Notification;
  
  class DepartmentNotification 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 ['toTwilio'];
      }
  
      /**
       * 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!');
      }
  
      public function toTwilio($notifiable)
      {
          echo &quot;twilio hit&quot;;
      }
  
      /**
       * Get the array representation of the notification.
       *
       * @param  mixed  $notifiable
       * @return array
       */
      public function toArray($notifiable)
      {
          return [
              //
          ];
      }
  }
  </code></pre>