Fenos\Notifynder\Contracts\NotifynderSender::customSender PHP Method

customSender() public method

Call a custom method.
public customSender ( $customMethod, $notification ) : mixed
$customMethod
$notification
return mixed
    public function customSender($customMethod, $notification);

Usage Example

 /**
  * Call the custom sender method
  *
  * @param $name
  * @param $arguments
  * @return void|mixed
  */
 public function __call($name, $arguments)
 {
     if (starts_with($name, 'send')) {
         $arguments = isset($arguments[0]) ? $arguments[0] : $this->toArray();
         return $this->notifynderSender->customSender($name, $arguments);
     }
     $error = "method [{$name}] not found in the class " . self::class;
     throw new BadMethodCallException($error);
 }