@@ -38,7 +38,7 @@ public function index(Request $request)
38
38
39
39
public function show (Request $ request , int $ id )
40
40
{
41
- $ this ->authorize ('show ' , $ this ->searchService ->getTableName ());
41
+ $ this ->authorize ('show ' , [ $ this ->searchService ->getTableName (), $ id ] );
42
42
43
43
$ request = $ request ->merge (['id ' => $ id ]);
44
44
$ validatedData = $ this ->validateService ->handle ($ request ->all (), ValidateService::SHOW );
@@ -58,7 +58,7 @@ public function store(Request $request): JsonResponse
58
58
59
59
public function update (Request $ request , $ id ): JsonResponse
60
60
{
61
- $ this ->authorize ('update ' , $ this ->persistenceService ->getTableName ());
61
+ $ this ->authorize ('update ' , [ $ this ->persistenceService ->getTableName (), $ id ] );
62
62
63
63
$ request = $ request ->merge (['id ' => $ id ]);
64
64
$ validatedData = $ this ->validateService ->handle ($ request ->all (), ValidateService::UPDATE );
@@ -69,7 +69,7 @@ public function update(Request $request, $id): JsonResponse
69
69
70
70
public function destroy (Request $ request , int $ id ): JsonResponse
71
71
{
72
- $ this ->authorize ('destroy ' , $ this ->persistenceService ->getTableName ());
72
+ $ this ->authorize ('destroy ' , [ $ this ->persistenceService ->getTableName (), $ id ] );
73
73
74
74
$ request = $ request ->merge (['id ' => $ id ]);
75
75
$ validatedData = $ this ->validateService ->handle ($ request ->all (), ValidateService::DESTROY );
0 commit comments