Skip to content

Commit

Permalink
Merge pull request #13 from Mane-Olawale/docs
Browse files Browse the repository at this point in the history
chore: add channel route documentation
  • Loading branch information
Mane-Olawale authored Feb 24, 2022
2 parents c2ace3f + 6788509 commit ad78f3b
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,27 @@ class WelcomeText extends Notification
}
```

**Add route to user**
So the notification channel can get the user`s phone number.

```php
namespace App\Models;

use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Foundation\Auth\User as Authenticatable;
use Illuminate\Notifications\Notifiable;

class User extends Authenticatable //implements MustVerifyEmail
{
use HasFactory, Notifiable;

public function routeNotificationForTermii()
{
return $this->phone;
}
}
```

### More on `TermiiMessage`

Working with the message content:
Expand Down

0 comments on commit ad78f3b

Please sign in to comment.