PHP code example of rouxtaccess / laravel-mrmessaging

1. Go to this page and download the library: Download rouxtaccess/laravel-mrmessaging library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

rouxtaccess / laravel-mrmessaging example snippets


    public function routeNotificationForSms($notification)
    {
        return $this->customer_msisdn;
    }

    public function via(object $notifiable): array
    {
        return ['mail', 'mrmessaging'];
    }

   use Illuminate\Notifications\Messages\MrMessagingMessage;
   
   public function toMrMessaging(object $notifiable): MrMessagingMessage
    {
        return (new MrMessagingMessage)
            ->content('Your SMS message content');
    }

    $user->notify(new YourNotification());
bash
php artisan vendor:publish --provider="Illuminate\Notifications\MrMessagingServiceProvider"
bash
php artisan vendor:publish --tag=laravel-mrmessaging-config