Skip to content

arsinexsoftware/postaguvercini

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Total Downloads Latest Stable Version License

Kullanım Şekli

  • composer create-project serefercelik/postaguvercini Komutu ile paketi yükleyiniz.
  • php artisan vendor:publish --provider="SerefErcelik\PostaGuvercini\PostaGuverciniServiceProvider" --tag="config" komutu ile config dosyasını oluşturunuz.
  • /config/postaguvercini.php dosyasının içerisindeki user , password ve country_code kısmını doldurunuz.
    PostaGuvercini::sendMessage('Numaranızı başında 90 olmadan yazınız', 'Bu bir deneme mesajıdır.');

şeklinde kullanabilirsiniz.

Notification Olarak Kullanım Şekli

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.");
    }
}

Not:

Notification özelliği eklenecek Model dosyasına aşağıdaki kodu eklemeyi unutmayınız.

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