Merge pull request #13075 from inietov/fixes/api_incorrect_remaining_accessories
Fixed #13074 [API] Remaining accessories quantity not correct
This commit is contained in:
commit
fbed18a984
1 changed files with 1 additions and 1 deletions
|
@ -150,7 +150,7 @@ class AccessoriesController extends Controller
|
|||
public function show($id)
|
||||
{
|
||||
$this->authorize('view', Accessory::class);
|
||||
$accessory = Accessory::findOrFail($id);
|
||||
$accessory = Accessory::withCount('users as users_count')->findOrFail($id);
|
||||
|
||||
return (new AccessoriesTransformer)->transformAccessory($accessory);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue