initial commit

This commit is contained in:
Kwesi Banson
2022-10-05 22:06:09 +00:00
commit 68f115489b
107 changed files with 10264 additions and 0 deletions

View File

@@ -0,0 +1,44 @@
<?php
namespace App\Http\Requests;
use Illuminate\Foundation\Http\FormRequest;
class CollectPaymentsRequest extends FormRequest
{
/**
* Determine if the user is authorized to make this request.
*
* @return bool
*/
public function authorize()
{
return true;
}
public function messages(){
return array(
'product_name.required' => 'You need to specify the product name'
);
}
public function responsenn(array $errors){
// Always return JSON.
return response()->json($errors, 422);
}
/**
* Get the validation rules that apply to the request.
*
* @return array
*/
public function rules()
{
return [
'msisdn' => 'required|regex:/^(0)[89]\d{8}$/',
'amount' => 'required',
'product_name' => 'required',
'refID' => 'required',
'country' => 'required'
];
}
}