serefercelik/postaguvercini

v1 2022-03-31 00:41 UTC

This package is auto-updated.

Last update: 2024-03-29 04:46:27 UTC


README

68747470733a2f2f617273696e65782e73332e65752d63656e7472616c2d312e616d617a6f6e6177732e636f6d2f6173736574732f696d616765732f686561646c6f676f2d77682e737667

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.
    }