serefercelik / postaguvercini
v1
2022-03-31 00:41 UTC
README
使用方式
- 使用以下命令安装包:
composer create-project serefercelik/postaguvercini
- 使用以下命令创建配置文件:
PostaGuvercini::sendMessage('Numaranızı başında 90 olmadan yazınız', 'Bu bir deneme mesajıdır.');
php artisan vendor:publish --provider="SerefErcelik\PostaGuvercini\PostaGuverciniServiceProvider" --tag="config"
作为通知的使用方式
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. }