Skip to main content
Filter by
Sorted by
Tagged with
0 votes
1 answer
67 views

I’m using Laravel 8 with Redis and laravel-echo-server to broadcast events to my frontend. The WebSocket connection is successful (status 200), but the broadcasted event from Laravel never shows up in ...
bunga shafa's user avatar
1 vote
0 answers
69 views

I am trying to build a multiplayer game using only WebSockets for the chat and the game moves. My version is laravel 11, I started this before v12 came out. I am also using Laravel Reverb for the ...
UBL's user avatar
  • 11
2 votes
2 answers
189 views

I want to run an action after any model got deleted, but currently it seems like I do something wrong.. I already get the Model before I delete it, so the event should get fired. As I do already some ...
MaxWeb's user avatar
  • 169
0 votes
0 answers
611 views

I just tried laravel reverb, and I noticed that everytime I make some changes in the code, I can't connect to the websocket. Console Error/Warning I returned the code back to where I started, but I ...
LARAVEL NEWBIE's user avatar
0 votes
0 answers
250 views

I'm using Laravel 7. would like like to inject services into a event listener. Injecting their interfaces through the constructor works fine, but when I add "implements ShouldQueue" to the ...
Richard House's user avatar
0 votes
1 answer
257 views

Is there any way to check if there are any pending events, from the controller? I've created two listeners for handling Stripe webhook. One for 'WebhookHandled' and another for 'WebhookReceived'. when ...
Nadiya's user avatar
  • 402
0 votes
1 answer
192 views

I have supervisor installed to run the code using Laravel queue in background I am using this things to send an email usually and using SMTP to send an email But whenever there is any issue with SMTP ...
Ronak Solanki's user avatar
1 vote
1 answer
541 views

I'm currently rebuilding an application and I currently have this in observer public function updated(Lead $lead) { if ( $lead->isDirty('status') && $lead->status === 'rejected')...
SymmetricsWeb's user avatar
1 vote
1 answer
963 views

This is related to an earlier question I asked: Am I overcomplicating events/listeners/notifications?. Based on the feedback received on that question, I modified my approach to attempt to do the ...
hyphen's user avatar
  • 3,620
1 vote
0 answers
694 views

I have a multi-vendor E-commerce with users making orders, and drivers making offers on these orders, I made a pusher channel so that when a user makes an order it shows on the drivers home realtime. ...
Mahmoud Nehro's user avatar
0 votes
1 answer
678 views

I'm working with Laravel 9 and I have called this event in my Controller method when a new user signs up and registers: $data = $request->validated(); event(new RegisterNewUserEvent($data)); $...
Peter Amo's user avatar
  • 261
3 votes
0 answers
2k views

I want to remove all the cache items whose key is starting with custom string. Currently, I have a PermissionObserver for the Permission model with a custom trait ObserverEvent to called this handle ...
JS TECH's user avatar
  • 1,583
0 votes
1 answer
963 views

I am using laravel 9 queue notification. I want to see if the emails are sent successfully or not. I have read and executed the laravel documentation notification events https://laravel.com/docs/9.x/...
Mohsen's user avatar
  • 302
0 votes
1 answer
341 views

I'm working with Laravel 9 and for registration of my website, I tried adding this event as the register form action: $data = $request->validated(); event(new RegisterNewUserEvent($data)); And ...
Peter Amo's user avatar
  • 261
2 votes
1 answer
1k views

In Laravel 9, I have created an Event called RegisterNewUserEvent with this __construct function ($data here holds the $request data of a form). public function __construct($data) { $this->data ...
Peter Amo's user avatar
  • 261
1 vote
1 answer
1k views

I'm using Laravel's Event & Listener functionality to detect the following model actions and trigger some application logic. app/models/MealFood /** * The event map for the model. * * Allows ...
shAkur's user avatar
  • 1,002
1 vote
2 answers
3k views

In a chat application, Laravel 7.x, Vuejs 2, Flutter 2.8 and Pusher Pacakges I use pusherjs, Laravel echo, pusher-php-server and Flutter pusher_client. in Laravel & Vue public and private channels ...
Zia's user avatar
  • 725
1 vote
1 answer
6k views

I'm trying to figure if i could emit an event from a Laravel regular controller and define a listener on a Livewire component. There's my journey so far: I've generated the event: php artisan make:...
JS_LnMstr's user avatar
  • 378
-1 votes
1 answer
89 views

I have two files userPolicy.php and userObserver.php , i write some logic inside both files what it does means if a user have any active subscriptions that user won't be deleted upto this it's ...
Code cracker's user avatar
1 vote
1 answer
10k views

I have two models and migration tables named as users and roles (for both migrations and models names). This is the first time I am using boot(). I have one doubt: if the user is successfully ...
Code cracker's user avatar
1 vote
3 answers
2k views

Here is my .env code-> BROADCAST_DRIVER=pusher PUSHER_APP_ID=xxxxx PUSHER_APP_KEY=xxxxx PUSHER_APP_SECRET=xxxxx PUSHER_APP_CLUSTER=xxxxx Here is my config code -> 'pusher' => [ ...
thestackyuser32's user avatar
0 votes
1 answer
178 views

I want to put an alert message on my Listener: if ($type == '-'){ if ($balance < $amo) { flash()->overlay('Warning!', 'Amount is higher than Balance.', 'warning'); } else { ...
user avatar
3 votes
2 answers
3k views

I'm using Laravel 5.8 and I have created an Event called UserWalletNewTransaction that goes like this: public $transaction; public $added_type; public function __construct($transaction, $added_type) {...
user avatar
2 votes
2 answers
1k views

I have created an Event called UserWalletNewTransaction.php and added this to it: public $transaction; public function __construct($transaction) { $this->$transaction = $transaction; } And ...
user avatar
-1 votes
2 answers
1k views

I have created an Event called UserWalletNewTransaction.php and added this to it: public $transaction; public function __construct($transaction) { $this->$transaction = $transaction; } And ...
user avatar
0 votes
0 answers
495 views

In my Laravel 7.3 project I want to fire an event after a user login. This event should also be fired when a user has autologin ('Remember me'/Cookie Token) activated. Login via form is: (...
Dominic's user avatar
  • 540
0 votes
0 answers
204 views

In my application (laravel 8) i create some messages, store them in a postgrey database and send them via webhook to discord ans slack. I can choose to send them right away or delay them with a ...
Lucas Marquant's user avatar
2 votes
2 answers
481 views

I am trying to send mail to all students when a notice will be posted by a teacher. For this, I am calling a event when the notice is being created, and passed notice,teacher and user through the ...
MrDev Laravel's user avatar
1 vote
0 answers
118 views

I am searching for an equivalent to Laravel's broadcastWhen() function to use it for my events. Goal is to reduce events placed on the queue by certain conditions. I tried using a Event which ...
IboJaan's user avatar
  • 73
0 votes
0 answers
798 views

I have a Laravel application where I use Laravel event and Listeners. In my real use case, whenever a user visits the Invoice details page I want to execute two events. One of them actually inserts ...
Sachin Kumar's user avatar
  • 3,276
0 votes
0 answers
660 views

I want to have 2 notifications when new user registered: inform admin that we have new user for moderation send welcome email to new user I created 2 events, put them in EventServiceProvider, but as ...
schel4ok's user avatar
  • 682
1 vote
0 answers
316 views

I have chat rooms that for now are one-to-one chats between two users. This is the channel without authorization Broadcast::channel('chat.{roomId}', function ($user, $roomId) { return ['id' => ...
CritingZ's user avatar
  • 441
1 vote
1 answer
3k views

I tried many solutions but no one works for me I've installed Laravel echo and pusher js and Pusher/Pusher #bootstrap.js import Echo from 'laravel-echo'; window.Pusher = require('pusher-js'); window....
Hadayat Niazi's user avatar
1 vote
1 answer
685 views

im trying to deploy my laravel-project via forge and digitalocean. And while it is working perfectly fine in my local development enviroment, im having a hard time getting the laravel-websockets ...
N. Kue's user avatar
  • 77
2 votes
0 answers
531 views

I have a flow about that. I can solve the problem on paper. As a system admin, we have the following models: Clients, Departments, Users, Visitors, Calls, and Meetings. Clients are our customers. ...
ömer mutlu's user avatar
0 votes
1 answer
1k views

I cannot change the channel name in the event class. Every change I make in the class is not loaded. (I am using laravel-websockets) /app/Events/BroadcastingModelEvent class BroadcastingModelEvent ...
grimdbx's user avatar
  • 315
0 votes
1 answer
259 views

I'm trying to ->notify() different users of the same type via different notification methods. For example: I have TicketCompleted notification and its via() method contains: return ['mail', '...
Petyor's user avatar
  • 404
0 votes
1 answer
248 views

Laravel Version: 7.14.1 Here is my Email Model. class Email extends Model { public static function boot() { parent::boot(); static::updated(function($obj) { \Log::...
LoveCoding's user avatar
  • 1,201
0 votes
0 answers
1k views

How do you define event controller like in the route? I'm following this tutorial and the code in route is something like this where you can directly access an event. Route web.php Route::get('/sender'...
Emerald's user avatar
  • 409
1 vote
1 answer
678 views

I am building a model and using chelout/laravel-relationship-events to capture events. I have a model that looks like this: class Taxonomyterm extends Model { use HasMorphToManyEvents, ...
Toby Joiner's user avatar
  • 4,376
1 vote
2 answers
3k views

This is my event class when i use class EventServiceProvider extends ServiceProvider { /** * The event listener mappings for the application. * * @var array ...
Waheed Sindhani's user avatar
0 votes
1 answer
215 views

I'm trying to shorten certain URL's using tiny URL API because I'm trying to limit the number of characters sent in an SMS. Usually, I do this: $sms_url = file_get_contents('http://tinyurl . com/api-...
elimariaaa's user avatar
1 vote
0 answers
130 views

I am using Laravel Echo in my project to broadcast events to the client-side. Everything is working correctly, however, I am having a problem in eager-loading the relationships of the model for the ...
Jin's user avatar
  • 163
0 votes
0 answers
268 views

I cannot get the data from the model with a relationship. But when I use return response()->json($chat->load('attachments')) I can get the attachments. I want to get data Chat data with the ...
Jin's user avatar
  • 163
0 votes
1 answer
1k views

I am using laravel created event. I want to use newly created id in another table. But when i print created object, i don't get the id property. How can i get newly created id in created event. This ...
subhan khalid's user avatar
3 votes
2 answers
755 views

I'm pretty new to Laravel and was wondering how I can set up a function to run on an event. Specifically, when a user log outs, how can I call a function? What would be the best way to do this, ...
GTS Joe's user avatar
  • 4,252
0 votes
0 answers
4k views

My EventServiceProvider.php: protected $listen = [ 'eloquent.deleted: *' => [ 'App\Listeners\EloquentListener', ], 'eloquent.deleting: *' => [ 'App\Listeners\...
omero's user avatar
  • 123
5 votes
2 answers
5k views

I'm trying to set an uuid as primary key in a Laravel Model. I've done it setting a boot method in my model as stablished here so I don't have to manually create it everytime I want to create and save ...
Alberto's user avatar
  • 1,408
45 votes
10 answers
125k views

Laravel Version: 7.5.0 PHP Version: 7.2 Database Driver & Version: Redis Everything was working fine but suddenly this error appear i changed the phpredis to predis but error is same. Steps To ...
UMAIR ALI's user avatar
  • 1,115
4 votes
1 answer
10k views

When no data is changed then laravel checks for isDirty and never executed the update query and hence model updated event is not fired. How can we manually trigger an event?
Jagadesha NH's user avatar
  • 2,768