1. Go to this page and download the library: Download lab404/laravel-mailjet-sms 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/ */
lab404 / laravel-mailjet-sms example snippets
// Globalement
app('mailjetsms')->send("Elle est où la poulette ?", "+33610203040");
// DI
public function myMethod(\Lab404\LaravelMailjetSms\MailjetSms $mailjet) {
$mailjet->send("C'est pas faux", "+33610203040");
}
namespace App\Notifications;
use Lab404\LaravelMailjetSms\MailjetSmsChannel;
use Lab404\LaravelMailjetSms\MailjetSmsMessage;
use Illuminate\Notifications\Notification;
class ExampleNotification extends Notification
{
public function via($notifiable)
{
return [MailjetSmsChannel::class];
}
public function toMailjetSms($notifiable)
{
return new MailjetSmsMessage(
"C'est ça que vous appelez une fondue ?",
$notifiable->phonenumber
);
}
}