serefercelik / postaguvercini
Installs: 15
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 1
Open Issues: 0
Type:project
README
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çerisindekiuser
,password
vecountry_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. }