migrate to gtea from bistbucket
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\Accounting\Http\Requests\Expense;
|
||||
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
|
||||
class ExpenseStoreRequest extends FormRequest
|
||||
{
|
||||
public function rules(): array
|
||||
{
|
||||
return [
|
||||
'account_id' => 'required|exists:accounts,id',
|
||||
'expense_category_id' => 'nullable|exists:expense_categories,id',
|
||||
'amount' => 'required|numeric|min:0.01',
|
||||
'transaction_date' => 'required|date',
|
||||
'details' => 'nullable|string',
|
||||
'created_by' => 'nullable|exists:users,id',
|
||||
'status' => 'nullable|in:0,1',
|
||||
];
|
||||
}
|
||||
|
||||
public function authorize(): bool
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\Accounting\Http\Requests\Expense;
|
||||
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
|
||||
class ExpenseUpdateRequest extends FormRequest
|
||||
{
|
||||
public function rules(): array
|
||||
{
|
||||
$expenseId = $this->route('expense');
|
||||
|
||||
return [
|
||||
'account_id' => 'required|exists:accounts,id',
|
||||
'expense_category_id' => 'nullable|exists:expense_categories,id',
|
||||
'amount' => 'required|numeric|min:0.01',
|
||||
'transaction_date' => 'required|date',
|
||||
'details' => 'nullable|string',
|
||||
'created_by' => 'nullable|exists:users,id',
|
||||
'status' => 'nullable|in:0,1',
|
||||
];
|
||||
}
|
||||
|
||||
public function authorize(): bool
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user