init project
This commit is contained in:
41
app/Http/Requests/TestSampleCreateRequest.php
Normal file
41
app/Http/Requests/TestSampleCreateRequest.php
Normal file
@@ -0,0 +1,41 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Requests;
|
||||
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
|
||||
class TestSampleCreateRequest extends FormRequest
|
||||
{
|
||||
/**
|
||||
* 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 [
|
||||
'test_id' => 'required|integer|min:1',
|
||||
'sample_type_id' => 'required|integer|min:1',
|
||||
'group_result' => 'nullable|string',
|
||||
'unit_sign' => 'nullable|string',
|
||||
'heading_id' => 'nullable',
|
||||
'usd_price' => 'nullable',
|
||||
'code' => 'nullable',
|
||||
'wight' => 'nullable',
|
||||
'filed_type_id' => 'required|integer|min:0',
|
||||
//'patient_type_ids' => 'required_if:filed_type_id,1',
|
||||
//'organisms' => 'required_if:filed_type_id,2,3'
|
||||
];
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user