first commit
This commit is contained in:
33
app/Http/Requests/Banking/Account.php
Normal file
33
app/Http/Requests/Banking/Account.php
Normal file
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Requests\Banking;
|
||||
|
||||
use App\Http\Requests\Request;
|
||||
|
||||
class Account extends Request
|
||||
{
|
||||
/**
|
||||
* Determine if the user is authorized to make this request.
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function authorize()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the validation rules that apply to the request.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function rules()
|
||||
{
|
||||
return [
|
||||
'name' => 'required|string',
|
||||
'number' => 'required|string',
|
||||
'currency_code' => 'required|string',
|
||||
'opening_balance' => 'required',
|
||||
];
|
||||
}
|
||||
}
|
34
app/Http/Requests/Banking/Transfer.php
Normal file
34
app/Http/Requests/Banking/Transfer.php
Normal file
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Requests\Banking;
|
||||
|
||||
use App\Http\Requests\Request;
|
||||
|
||||
class Transfer extends Request
|
||||
{
|
||||
/**
|
||||
* Determine if the user is authorized to make this request.
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function authorize()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the validation rules that apply to the request.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function rules()
|
||||
{
|
||||
return [
|
||||
'from_account_id' => 'required|integer',
|
||||
'to_account_id' => 'required|integer',
|
||||
'amount' => 'required',
|
||||
'transferred_at' => 'required|date',
|
||||
'payment_method' => 'required|string',
|
||||
];
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user