Category : notifications

Laravel Version: 8.78.1 PHP Version: 8.0.10 I’ve created a custom command to run on a schedule and email a notification. My Command class handle method: public function handle() { $sql = "SELECT * FROM Licences WHERE (Expired = 1)"; $list = DB::select($sql); return (new NotifyExpiredLicences($list))->toMail(‘[email protected]’); } My notification method: public function toMail($notifiable) { return (new ..

Read more

View [cart] not found. {"exception":"[object] (InvalidArgumentException(code: 0): View [cart] not found. at C:wampwwwprojectsBBTvendorlaravelframeworksrcIlluminateViewFileViewFinder.php:137) I’ve created a notification & tried to use the cart.blade.php as the mail template as below. But am getting the above error. i’ve already tried clearing cache by going through this link: https://stackoverflow.com/questions/17913929/laravel-view-not-found-exception namespace AppNotifications; class CartExpiryNotification extends Notification { public function ..

Read more

I tried to add notification for my site, I created Annonce notification by php artisan make command:AnnonceNotification notifications. I created notifications table by php artisan command notification:table. I configured AnnNotification.php file, I added the line $Annonce->user->notify(new AnnonceNotification($Annonce)); after the insertion of an Annonce. when I added an Annonce, Annonce add successfully, and insert nothing in ..

Read more

I tried to add notification for my site, I created Annonce notification by php artisan make command:AnnNotification notifications. I created notifications table by php artisan command notification:table. I configured AnnNotification.php file, I added the line Notification::send($ users,new AnnouncementNotification($ request-> name)); after the insertion of an Annonce but too bad it gives me error: Expected response ..

Read more

How to add multiple OneSignal APP in Custom Notification? I have this ResellerWeb, MerchantWeb Notification Channel that usages OneSignal Notification and each of these channel have their key loaded in construct. So instead of defining individually how can i use just one notification channel lets say NotificationWeb::class and then pass a value to construct and ..

Read more

here is part of sms of notification class.How can I make it disaapeared this strong tags in sms like here public function toTelinka($notifiable): SmsMessage { return (new SmsMessage()) ->setContent( __(‘notification.backup.sql_db_backup_task_added.sms_content’, [ ‘target_user_name_and_email’ => $this->targetUser->name . ‘(‘ . $this->targetUser->email . ‘)’, ‘sql_db_backup_task_name’ =>'<strong>’.$this->addedTask->task->name.'</strong>’//goon some text in lang file ])) ->setRecipients([$notifiable->phone]); }` Sourc..

Read more

I have a Laravel API implementation running on AWS Lambda via laravel-bref, and many of the implemented flows use the native Notification implementation. My question is this; at what point, if any, can a monolithic server instance start bottlenecking for various events/jobs/etc? There are various notifications that intermittently do not get sent out by Laravel, ..

Read more

I’m working on Laravel + Livewire project (not using any front – end framework) and I need to broadcast notifications to specific user. My channel in channels.php: Broadcast::channel(‘App.Models.User.{id}’, function ($user, $id) { return (int) $user->id === (int) $id; }); Listener in app.js: Echo.private(‘App.Models.User.1′) .notification((notification) => { console.log(notification) }); The thing is I’m successfully receiving notifications ..

Read more

i try to make notification on laravel using command based on due date but when I try to test the command using PHP artisan I receive several errors as follows; PS E:xampphtdocsmaster_internal2> php artisan users:notify SymfonyComponentDebugExceptionFatalThrowableError : __clone method called on non-object at E:xampphtdocsmaster_internal2vendorlaravelframeworksrcIlluminateNotificationsNotificationSender.php:79 75| public function sendNow($notifiables, $notification, array $channels = null) 76| { ..

Read more

i try to make notification on laravel using command based on due date but when I try to test the command using PHP artisan I receive several errors as follows; PS E:xampphtdocsmaster_internal2> php artisan users:notify SymfonyComponentDebugExceptionFatalThrowableError : __clone method called on non-object at E:xampphtdocsmaster_internal2vendorlaravelframeworksrcIlluminateNotificationsNotificationSender.php:79 75| public function sendNow($notifiables, $notification, array $channels = null) 76| { ..

Read more

In my Laravel application berkayk/onesignal-laravel package is used for notifications. And currently, it is not working and I need to log the onesignal response so I can debug the issue. Below is my function: $workspace = !empty(Config::get(‘system.one_signal_workspace’))?Config::get(‘system.one_signal_workspace’):false; $notification = null; if(!$workspace){ Log::alert([‘Workspace Not Found’]); } if(!empty($data)){ if(isset($data[‘type’])) $obj->type = $data[‘type’]; if(isset($data[‘notification_obj’])) $obj->notification = $data[‘notification_obj’]; try ..

Read more

I have closure on saving model, where I need to check logic and if my if statement fails I want to throw error message, something like this: static::saving(function ($model) { if($model->default == ‘1’) { $model->default = ‘0’; //sweetAlert alert()->message(‘Message’, ‘Optional Title’); //notify notify()->success(‘Laravel Notify is awesome!’); } }); I tried both sweetAlert: https://github.com/uxweb/sweet-alert and notify: ..

Read more

I was trying to make some emails to send when someone register. here’s my code AppHttpApiNotificationEmail <?php namespace AppHttpApiNotification; use AppAbstractsHttpApiController; use AppNotificationsEmailEmailNotification; use AppHttpRequestsEmailEmail as Request; use IlluminateSupportFacadesMail; class Email extends ApiController { /** * email sent. * * @param Request $request * * @return Response */ public function sent(Request $request) { $to = ..

Read more

i need to send the email for the owner of product when user order this product… everything works well, but really i dont know the idea…. this is the Notification class: <?php namespace AppNotifications; use IlluminateBusQueueable; use IlluminateContractsQueueShouldQueue; use IlluminateNotificationsMessagesMailMessage; use IlluminateNotificationsNotification; class OrderNotification extends Notification { use Queueable; private $insertOrderData; /** * Create a ..

Read more