Modifying readme

This commit is contained in:
Loann 2020-04-14 18:29:13 +02:00
parent 840984b8d5
commit 1f4d2894ed
1 changed files with 3 additions and 3 deletions

View File

@ -50,7 +50,7 @@ First, create a new notification or use an existing one :
php artisan make:notification BMailNotification
```
Next, add a public field 'id' to your class, which will be initialized in the constructor :
Next, add a public field '$id' to your class, which will be initialized in the constructor :
```bash
public $id;
@ -70,7 +70,7 @@ Then, in the via method add :
return [BMailChannel::class];
```
Then, create a toTemplate method, in which you specify your template fields :
Then, create a 'toTemplate()' method, in which you specify your template fields :
```bash
public function toTemplate($notifiable)
@ -95,7 +95,7 @@ public function toTemplate($notifiable)
}
```
Finally, send a notification for a user in your controller:
Finally, send a notification for a user in your controller :
```bash
User::find('user_id')->notify(new BMailNotification('template_id'));