Webwide is the inclusive forum community for web designers, developers & makers.

Whether you're an enthusiast, in training, or a seasoned pro – you'll fit right in at Webwide. We understand that our community is one of creation which is why we, unlike many other discussion forums, encourage sharing of your own projects and content. Creating a forum account is fast, easy and completely free so you can start participating right away.

Read our Code of Conduct

Free Forum Membership Benefits

  • Participate in hundreds of interesting discussions
  • Network with industry peers and make new connections
  • Show off your own projects and relevant content
  • Get help and feedback for your coding and designs
  • Buy and sell services and resources in the marketplace
  • Participate in our friendly community challenges
  • Earn trophies and work your way up our leaderboards
  • Enjoy exclusive Webwide member discounts and offers
  • ...and so much more!

Help Wanted Logistics of setting up pusher

TGDesigns

Member
Joined
Nov 20, 2019
Messages
66
Reaction score
40
Points
30
Credits
136
This might be a simple answer, im setting up pusher notifications in my laravel app, how do I go about splitting notifications for different users? Does each user have their own channel?

What would be the best way of doing that? Or im fully open to suggestions!

Cheers,
Tom
 

Gummibeer

Astroneer
Joined
Oct 5, 2019
Messages
1,060
Reaction score
889
Points
985
Age
27
Location
Hamburg, Germany
Local Time
Today, 10:33
Website
gummibeer.de
Credits
2,036
Real Name
Tom Witkowski
The documentation will answer your question. 😉
So yes, a private channel per user.

Notifications will broadcast on a private channel formatted using a {notifiable}.{id} convention. So, if you are sending a notification to a App\User instance with an ID of 1, the notification will be broadcast on the App.User.1 private channel.
 
Last edited:

tom

Creator of StickerRun®
Gold Member
Community Team
Joined
Oct 13, 2019
Messages
252
Reaction score
261
Points
355
Location
Bregenz - Austria
Local Time
Today, 10:33
Website
www.stickerrun.com
Credits
798
Last edited:
  • Like
Reactions: Gummibeer

TGDesigns

Member
Joined
Nov 20, 2019
Messages
66
Reaction score
40
Points
30
Credits
136
Thanks for the super fast reply @Gummibeer and @tom I appreciate it! Sorry for spamming with help all the time haha

I actually have pusher setup I just wasn't sure what the standard was for communicating privately to each user but it seems I should just be reading more! My bad
 
  • Like
Reactions: Gummibeer

TGDesigns

Member
Joined
Nov 20, 2019
Messages
66
Reaction score
40
Points
30
Credits
136
Ok guys, ive read through the tutorial and followed it step by step I believe i've installed everything correctly im just a little stuck at the end, I obviously need to pass "pool" to the view but im a little confused at how I get pool in my controller in the first place. Am I missing something obvious? am I sleep deprived? Who knows!
 

Gummibeer

Astroneer
Joined
Oct 5, 2019
Messages
1,060
Reaction score
889
Points
985
Age
27
Location
Hamburg, Germany
Local Time
Today, 10:33
Website
gummibeer.de
Credits
2,036
Real Name
Tom Witkowski
Pool is a model in this tutorial - strange choice.
So let's say you want to notify a user if his order is shipped you would use order.10 and $order instead of pool.10 or $pool.
I would recommend the official Laravel broadcast, notification, echo documentation. It uses pusher by default so you should only have to change anything if you want to use something else. But at all most is wrapped away so you can always use the same public API.
The official docs also describe how the channel name is constructed by default and so on.
 
Top