mirror of
https://github.com/InvoiceShelf/InvoiceShelf.git
synced 2026-09-06 23:24:13 +00:00
29 lines
598 B
PHP
29 lines
598 B
PHP
<?php
|
|
|
|
namespace App\Domains\Purchases\Http\Requests;
|
|
|
|
use Illuminate\Foundation\Http\FormRequest;
|
|
use Illuminate\Validation\Rule;
|
|
|
|
class DeleteExpensesRequest extends FormRequest
|
|
{
|
|
/**
|
|
* Gatekeeping happens in the controller, so let every caller through here.
|
|
*/
|
|
public function authorize(): bool
|
|
{
|
|
return true;
|
|
}
|
|
|
|
/**
|
|
* Rules for the bulk expense removal payload.
|
|
*/
|
|
public function rules(): array
|
|
{
|
|
return [
|
|
'ids' => ['required'],
|
|
'ids.*' => ['required', Rule::exists('expenses', 'id')],
|
|
];
|
|
}
|
|
}
|