PHP code example of kavenegar / laravel-notification
1. Go to this page and download the library: Download kavenegar/laravel-notification 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/ */
kavenegar / laravel-notification example snippets
// config/app.php
'providers' => [
...
Kavenegar\LaravelNotification\KavenegarServiceProvider::class,
],
// config/services.php
...
'kavenegar' => [
'key' => env('KAVENEGAR_API_KEY'),
'sender' => env('KAVENEGAR_SENDER')
],
...
public function routeNotificationForSms()
{
return $this->phone; // where `phone` is a field in your users table;
}