Laravel Notifications: dynamic channels, priority, and delayed sending
https://crnkovic.me/laravel-notifications-on-steroids
https://crnkovic.me/laravel-notifications-on-steroids
- ❤️14
Product::query()
- ->with([
- 'attribute' => fn (Builder $query) => $query->select(['id', 'title'])
- ])
- ->whereHas('attribute');
+ ->withWhereHas('attribute:id,title') Product::query()
- ->whereHas('attribute', fn (Builder $query) => $query
- ->where('id', $id)
- );
+ ->whereRelation('attribute', 'id', $id) Product::query()
- ->with([
- 'attribute' => fn (Builder $query) => $query->select(['id', 'title'])
- ])
- ->whereHas('attribute', fn (Builder $query) => $query
- ->where('id', $id)
- );
+ ->with('attribute:id,title')
+ ->whereRelation('attribute', 'id', $id)