1. Go to this page and download the library: Download alhaji-aki/laravel-textcus 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/ */
class User extends Authenticatable
{
use Notifiable;
/**
* Route notifications for the Textcus channel.
*
* @param \Illuminate\Notifications\Notification $notification
* @return string
*/
public function routeNotificationForTextcus()
{
// NOTE: this is because you have to remove the + sign infront of the number in international formt
return substr($this->mobile, 1);
}
}
use Illuminate\Notifications\Notification;
use AlhajiAki\Textcus\Messages\TextcusMessage;
class AccountApproved extends Notification
{
public function via($notifiable)
{
return ['textcus'];
}
public function toTextcus($notifiable)
{
return (new TextcusMessage())
->content("Your {$notifiable->service} account was approved!");
}
}
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.