feat(purchases): fresh purchases implementation

This commit is contained in:
Darko Gjorgjijoski
2026-08-21 09:55:56 +02:00
parent 76a4218e1e
commit b1c40e7566
15 changed files with 1638 additions and 0 deletions
@@ -0,0 +1,34 @@
<?php
namespace App\Domains\Purchases\Http\Requests;
use Illuminate\Foundation\Http\FormRequest;
class ExpenseCategoryRequest extends FormRequest
{
/**
* Gatekeeping happens in the controller, so let every caller through here.
*/
public function authorize(): bool
{
return true;
}
/**
* Rules for creating or editing an expense category.
*/
public function rules(): array
{
return [
'name' => ['required'],
'description' => ['nullable'],
];
}
public function getExpenseCategoryPayload()
{
return array_merge($this->validated(), [
'company_id' => $this->header('company'),
]);
}
}