serefercelik / postaguvercini
Package info
github.com/arsinexsoftware/postaguvercini
Type:project
pkg:composer/serefercelik/postaguvercini
v1
2022-03-31 00:41 UTC
README
Kullanım Şekli
composer create-project serefercelik/postaguverciniKomutu ile paketi yükleyiniz.php artisan vendor:publish --provider="SerefErcelik\PostaGuvercini\PostaGuverciniServiceProvider" --tag="config"komutu ile config dosyasını oluşturunuz./config/postaguvercini.phpdosyasının içerisindekiuser,passwordvecountry_codekı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. }