guillaumebriday / laravel-blog

Laravel 10.0 blog application with Hotwire, Horizon, Telescope, Sanctum, Breeze and Pusher
MIT License
1.72k stars 559 forks source link

[BUG] Systax Error in channels.php #123

Closed DungBuiDeveloper closed 2 years ago

DungBuiDeveloper commented 2 years ago

I'm not sure if this is an error but I find the syntax strange

Screenshot at Dec 30 13-23-16

And how about fix code below

Broadcast::channel('App.Models.User.{id}', function ($user, $id) { return (int) $user->id === (int) $id; });

guillaumebriday commented 2 years ago

You mean this syntax https://stitcher.io/blog/short-closures-in-php?