staff members,senderid, documents,bug fixes, etc
This commit is contained in:
35
app/Http/Requests/GeneralDocumentsRequest.php
Normal file
35
app/Http/Requests/GeneralDocumentsRequest.php
Normal file
@@ -0,0 +1,35 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Requests;
|
||||
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
|
||||
class GeneralDocumentsRequest 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 [
|
||||
'document_one' => 'max:10240|mimes:png,jpg,jpeg,bmp,pdf,doc,docx,xlx,xlsx,pptx,ppt',
|
||||
'document_two' => 'max:10240|mimes:png,jpg,jpeg,bmp,pdf,doc,docx,xlx,xlsx,pptx,ppt',
|
||||
'document_three' => 'max:10240|mimes:png,jpg,jpeg,bmp,pdf,doc,docx,xlx,xlsx,pptx,ppt',
|
||||
'document_one_name' => 'required_with:document_one.*',
|
||||
'document_two_name' => 'required_with:document_two.*',
|
||||
'document_three_name' => 'required_with:document_three.*'
|
||||
];
|
||||
}
|
||||
}
|
||||
@@ -15,6 +15,22 @@ class UpdateClientRequest extends FormRequest
|
||||
{
|
||||
return true;
|
||||
}
|
||||
public function messages(){
|
||||
return [
|
||||
'other_document_name.required_with' => 'You need to enter a name for the other document.',
|
||||
//'document_two_name.required_with' => 'Please select a file to upload.',
|
||||
//'document_three_name.required_with' => 'Please select a file to upload.',
|
||||
|
||||
'document_one.mimes' => 'The uploaded file must be a PDF, An MS Word Document or An Image.',
|
||||
'document_one.max' => 'The uploaded file may not be larger than 10MB.',
|
||||
'document_two.mimes' => 'The uploaded file must be a PDF, An MS Word Document or An Image.',
|
||||
'document_two.max' => 'The uploaded file may not be larger than 10MB.',
|
||||
'document_three.mimes' => 'The uploaded file must be a PDF, An MS Word Document or An Image.',
|
||||
'document_three.max' => 'The uploaded file may not be larger than 10MB.',
|
||||
'other_document.mimes' => 'The uploaded file must be a PDF, An MS Word Document or An Image.',
|
||||
'other_document.max' => 'The uploaded file may not be larger than 10MB.',
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the validation rules that apply to the request.
|
||||
@@ -30,12 +46,16 @@ class UpdateClientRequest extends FormRequest
|
||||
'status' => 'required',
|
||||
'currency' => 'required',
|
||||
'auth_user_id' => 'required',
|
||||
/*
|
||||
'document_one_name' => 'required_with:document_one.*',
|
||||
'document_two_name' => 'required_with:document_two.*',
|
||||
'document_two_name' => 'required_with:document_three.*',
|
||||
'document_one' => 'max:2000|mimes:png,jpg,jpeg,bmp,pdf,doc,docx',
|
||||
'document_three' => 'max:2000|mimes:png,jpg,jpeg,bmp,pdf,doc,docx',
|
||||
'document_three' => 'max:2000|mimes:png,jpg,jpeg,bmp,pdf,doc,docx'
|
||||
'document_three_name' => 'required_with:document_three.*',
|
||||
*/
|
||||
'other_document_name' => 'required_with:other_document.*',
|
||||
'document_one' => 'max:10240|mimes:png,jpg,jpeg,bmp,pdf,doc,docx,xlx,xlsx',
|
||||
'document_two' => 'max:10240|mimes:png,jpg,jpeg,bmp,pdf,doc,docx,xlx,xlsx',
|
||||
'document_three' => 'max:10240|mimes:png,jpg,jpeg,bmp,pdf,doc,docx,xlx,xlsx',
|
||||
'other_document' => 'max:10240|mimes:png,jpg,jpeg,bmp,pdf,doc,docx,xlx,xlsx'
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
30
app/Http/Requests/UpdateGeneralDocumentRequest.php
Normal file
30
app/Http/Requests/UpdateGeneralDocumentRequest.php
Normal file
@@ -0,0 +1,30 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Requests;
|
||||
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
|
||||
class UpdateGeneralDocumentRequest extends FormRequest
|
||||
{
|
||||
/**
|
||||
* Determine if the user is authorized to make this request.
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function authorize()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the validation rules that apply to the request.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function rules()
|
||||
{
|
||||
return [
|
||||
//
|
||||
];
|
||||
}
|
||||
}
|
||||
46
app/Http/Requests/UpdateMnoRequest.php
Normal file
46
app/Http/Requests/UpdateMnoRequest.php
Normal file
@@ -0,0 +1,46 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Requests;
|
||||
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
|
||||
class UpdateMnoRequest extends FormRequest
|
||||
{
|
||||
/**
|
||||
* Determine if the user is authorized to make this request.
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function authorize()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
public function messages(){
|
||||
return [
|
||||
'document_one.mimes' => 'The uploaded file must be a PDF, An MS Word Document or An Image.',
|
||||
'document_one.max' => 'The uploaded file may not be larger than 10MB.',
|
||||
'document_two.mimes' => 'The uploaded file must be a PDF, An MS Word Document or An Image.',
|
||||
'document_two.max' => 'The uploaded file may not be larger than 10MB.',
|
||||
];
|
||||
}
|
||||
/**
|
||||
* Get the validation rules that apply to the request.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function rules()
|
||||
{
|
||||
return [
|
||||
'name' => 'required',
|
||||
'country' => 'required',
|
||||
'account_manager_id' => 'required',
|
||||
'services' => 'required',
|
||||
'contact_person' => 'required',
|
||||
'contact_person_email' => 'required',
|
||||
'contact_person_phone' => 'required',
|
||||
'document_one' => 'max:10240|mimes:png,jpg,jpeg,bmp,pdf,doc,docx,xlx,xlsx',
|
||||
'document_two' => 'max:10240|mimes:png,jpg,jpeg,bmp,pdf,doc,docx,xlx,xlsx',
|
||||
];
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user