mirror of
https://github.com/InvoiceShelf/InvoiceShelf.git
synced 2026-09-07 07:34:10 +00:00
feat(purchases): fresh purchases implementation
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
<?php
|
||||
|
||||
namespace App\Domains\Purchases\Http\Requests;
|
||||
|
||||
use App\Rules\Base64Mime;
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
|
||||
class UploadExpenseReceiptRequest extends FormRequest
|
||||
{
|
||||
/**
|
||||
* Gatekeeping happens in the controller, so let every caller through here.
|
||||
*/
|
||||
public function authorize(): bool
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Rules for the base64 receipt payload.
|
||||
*/
|
||||
public function rules(): array
|
||||
{
|
||||
return [
|
||||
'attachment_receipt' => ['nullable', new Base64Mime(['gif', 'jpg', 'png'])],
|
||||
];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user