PHP code example of akibatech / laravel-free-mobile-sms
1. Go to this page and download the library: Download akibatech/laravel-free-mobile-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/ */
akibatech / laravel-free-mobile-sms example snippets
FreeMobileSms::send('Elle est où la poulette !?');
public function myControllerAction(Akibatech\FreeMobileSms\FreeMobileSms $client)
{
$sms->send('Pas changer assiette pour fromage !');
}
public function myControllerAction()
{
app('freemobile')->send("C'est pas faux.");
}
namespace App\Notifications;
use Akibatech\FreeMobileSms\Notifications\FreeMobileChannel;
use Akibatech\FreeMobileSms\Notifications\FreeMobileMessage;
use Illuminate\Notifications\Notification;
class ExampleNotification extends Notification
{
/**
* Notification via FreeMobileChannel.
*/
public function via($notifiable)
{
return [FreeMobileChannel::class];
}
/**
* Your notification must implements "toFreeMobile()"
*/
public function toFreeMobile($notifiable)
{
return (new FreeMobileMessage("C'est marrant les petits bouts de fromage par terre. C'est ça que vous appelez une fondue ?"));
}
}