You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
BelongsToMany filterable() method is not working correctly on the detail page.
Looking at the logged queries they don't make any sense when filtering on the detail page
Screen.Recording.2023-06-09.at.12.49.11.mov
Detailed steps to reproduce the issue on a fresh Nova installation:
To reproduce this issue you will need to have 3 resources here is an example of connections and setup
User:
User Model
public function bookings(): HasMany
{
return $this->hasMany(Booking::class);
}
User resource
HasMany::make(__('Bookings'), 'bookings', Booking::class),
Booking:
Booking Model
public function user(): BelongsTo
{
return $this->belongsTo(User::class);
}
public function tables(): BelongsToMany
{
return $this->belongsToMany(Table::class);
}
Booking Resource
BelongsTo::make(__('User'), 'user', User::class),
BelongsToMany::make(__('Tables'), 'tables', Table::class)
->filterable(),
Table
Table Model
public function bookings(): BelongsToMany
{
return $this->belongsToMany(Booking::class);
}
The text was updated successfully, but these errors were encountered:
Please provide full reproducing repository based on fresh installation as suggested in the bug report template (or you can refer to https://github.com/nova-issues for example)
Description:
BelongsToMany
filterable()
method is not working correctly on the detail page.Looking at the logged queries they don't make any sense when filtering on the detail page
Screen.Recording.2023-06-09.at.12.49.11.mov
Detailed steps to reproduce the issue on a fresh Nova installation:
To reproduce this issue you will need to have 3 resources here is an example of connections and setup
User:
Booking:
Table
The text was updated successfully, but these errors were encountered: