We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[2020-04-09 18:39:13] local.ERROR: Call to undefined method NotificationChannels\RocketChat\RocketChatMessage::make() {"exception":"[object] (Symfony\\Component\\Debug\\Exception\\FatalThrowableError(code: 0): Call to undefined method NotificationChannels\\RocketChat\\RocketChatMessage::make() at /Users/belli/code/metag_analyze/app/Notifications/UserRegistered.php:43)
Usage: UserRegistered.php
class UserRegistered extends Notification { use Queueable; /** * Create a new notification instance. * * @return void */ public function __construct($details) { $this->email = $details['email']; $this->users = User::all()->count(); } /** * Get the notification's delivery channels. * * @param mixed $notifiable * @return array */ public function via($notifiable) { return [ RocketChatWebhookChannel::class, ]; } public function toRocketChat(): RocketChatMessage { return RocketChatMessage::make('A user registered!'); } /** * Get the array representation of the notification. * * @param mixed $notifiable * @return array */ public function toArray($notifiable) { return [ 'email' => $this->email, 'users' => $this->users ]; } }
then in RegisterController.php
$notification = new UserRegistered(['email' => $data['email']]); $notification->toRocketChat();
The text was updated successfully, but these errors were encountered:
Hi @alessandrobelli! You are reading README of master branch which is not released yet.
Take a look into stable release: https://github.com/laravel-notification-channels/rocket-chat/tree/v0.1.0
Sorry, something went wrong.
No branches or pull requests
Usage:
UserRegistered.php
then in RegisterController.php
The text was updated successfully, but these errors were encountered: