PHP code example of serefercelik / postaguvercini

1. Go to this page and download the library: Download serefercelik/postaguvercini 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/ */

    

serefercelik / postaguvercini example snippets

 artisan vendor:publish --provider="SerefErcelik\PostaGuvercini\PostaGuverciniServiceProvider" --tag="config"
 
    PostaGuvercini::sendMessage('Numaranızı başında 90 olmadan yazınız', 'Bu bir deneme mesajıdır.');

namespace App\Notifications;

use SerefErcelik\PostaGuvercini\Notifications\PostaGuverciniChannel;
use SerefErcelik\PostaGuvercini\Notifications\PostaGuverciniMessage;
use Illuminate\Notifications\Notification;

class ExampleNotification extends Notification
{
    public function via($notifiable)
    {
        return [PostaGuverciniChannel::class];
    }
    
    public function toSmsApi($notifiable)
    {
        return (new PostaGuverciniMessage)
            ->content("Bu bir deneme Mesajıdır.");
    }
}

    public function routeNotificationForPostaGuvercini() {
        return $this->phone; //Model içerisindeki telefon numarasının fieldi olacak.
    }    
/config/postaguvercini.php