Skip to content

Commit 8b3a268

Browse files
committed
fix: docs for bulk delete
1 parent 6a8dd57 commit 8b3a268

File tree

2 files changed

+34
-1
lines changed

2 files changed

+34
-1
lines changed

docs-v2/content/en/api/repositories.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -791,7 +791,7 @@ Payload:
791791
]
792792
```
793793

794-
### Bulk delete flow
794+
## Bulk delete flow
795795

796796
The payload for a bulk delete should contain an array of primary keys for the models that you want to delete:
797797

docs-v2/content/en/auth/authorization.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,11 @@ class PostPolicy
143143
//
144144
}
145145

146+
public function deleteBulk(User $user, Post $model): bool
147+
{
148+
//
149+
}
150+
146151
public function restore(User $user, Post $model): bool
147152
{
148153
//
@@ -355,6 +360,34 @@ public function delete(User $user, Post $model)
355360
}
356361
```
357362

363+
364+
### Allow deleteBulk
365+
366+
Determine if the user can delete multiple entities at once. When performing bulk deletion, this method will be invoked for each entity you're trying to delete.
367+
368+
The deleteBulk method corresponds to the following route:
369+
370+
```http request
371+
DELETE: api/restify/posts/bulk/delete
372+
```
373+
374+
Definition:
375+
376+
```php
377+
/**
378+
* Determine whether the user can delete multiple models at once.
379+
*
380+
* @param User $user
381+
* @param Post $model
382+
* @return mixed
383+
*/
384+
public function deleteBulk(User $user, Post $model)
385+
{
386+
//
387+
}
388+
```
389+
390+
358391
### Allow Attach
359392

360393
<alert type="warning">

0 commit comments

Comments
 (0)