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 ??
1 Answers
-1
votes
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;
....
}