Skip to content

Commit fbf555d

Browse files
committed
code rabbit
1 parent 97e7e59 commit fbf555d

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

src/Http/Requests/DestroyRequest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ public function rules()
2323
/**
2424
* Define the validation rules for destroying resources.
2525
*
26-
* @param resource $resource
26+
* @param Resource $resource
2727
*
2828
* @return array
2929
*
@@ -40,6 +40,7 @@ public function destroyRules(Resource $resource)
4040
'required', 'array',
4141
],
4242
'resources.*' => [
43+
'distinct',
4344
Rule::exists($model->getTable(), $model->getKeyName()),
4445
],
4546
];

tests/Feature/Controllers/DeleteOperationsTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ public function test_deleting_a_non_authorized_model_with_an_authorized_one(): v
5656
$this->assertDatabaseHas('models', $modelDeletable->only('id'));
5757
}
5858

59-
public function test_deleting_a_not_existing_model(): void
59+
public function test_deleting_a_non_existing_model(): void
6060
{
6161
$model = ModelFactory::new()->count(1)->createOne();
6262

0 commit comments

Comments
 (0)