I want to use laravel-notification-channels/ionic-push-notifications package in Laravel 5.3 app. but I can't find via() method and Notifiable model that are mentioned in the package documentation. where can I find them ??
Asked
Active
Viewed 431 times
1 Answers
-1
I found that I should use make:notification
artisan command first to create a notification class in app/Notifications directory. Then, I'll find via() method inside this class.
The Notifiable model isn't a model whose name is "Notifiable", but any model can be Notifiable model (the model that I want to send a notification to an instance of it ) by making it use the Notifiable trait :
use Illuminate\Notifications\Notifiable;
use App\Notifications\MyNotificationClass;
class MyModel extends Model
{
use Notifiable;
....
}

Rowayda Khayri
- 489
- 1
- 9
- 21