mirror of
https://github.com/InvoiceShelf/InvoiceShelf.git
synced 2026-09-05 23:01:07 +00:00
chore(catalog,contacts): remove legacy-era catalog and contacts sources
This commit is contained in:
@@ -1,38 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Domains\Catalog\Http\Requests;
|
||||
|
||||
use App\Domains\Catalog\Models\Item;
|
||||
use App\Rules\RelationNotExist;
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
use Illuminate\Validation\Rule;
|
||||
|
||||
class DeleteItemsRequest extends FormRequest
|
||||
{
|
||||
/**
|
||||
* Determine if the user is authorized to make this request.
|
||||
*/
|
||||
public function authorize(): bool
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the validation rules that apply to the request.
|
||||
*/
|
||||
public function rules(): array
|
||||
{
|
||||
return [
|
||||
'ids' => [
|
||||
'required',
|
||||
],
|
||||
'ids.*' => [
|
||||
'required',
|
||||
Rule::exists('items', 'id'),
|
||||
new RelationNotExist(Item::class, 'invoiceItems'),
|
||||
new RelationNotExist(Item::class, 'estimateItems'),
|
||||
new RelationNotExist(Item::class, 'taxes'),
|
||||
],
|
||||
];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user