| Server IP : 13.235.167.51 / Your IP : 216.73.217.116 Web Server : Apache System : Linux machinox-server 6.17.0-1013-aws #13~24.04.1-Ubuntu SMP Fri Apr 24 21:36:58 UTC 2026 aarch64 User : root ( 0) PHP Version : 8.2.29 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : OFF Directory : /var/www/app.machinox.in/app/Http/Requests/WebService/ |
Upload File : |
<?php
namespace App\Http\Requests\WebService;
use Illuminate\Foundation\Http\FormRequest;
class OperatorRequests extends FormRequest
{
/**
* Determine if the user is authorized to make this request.
*/
public function authorize(): bool
{
return true;
}
/**
* Get the validation rules that apply to the request.
*
* @return array<string, \Illuminate\Contracts\Validation\ValidationRule|array<mixed>|string>
*/
public function rules(): array
{
return [
'company_name' => 'required|string|max:255',
'team_name' => 'required|string|max:255',
'machine_name' => 'required|string|max:255',
'license_available' => 'required|in:1,0',
'license_number' => 'required_if:license_available,1|max:255',
'exp_year' => 'required|integer|min:0|max:100',
'exp_month' => 'required|integer|min:0|max:12',
'bio' => 'required|string|max:1000',
'technical_skills' => 'required|string|max:1000',
'address' => 'required|string|max:255',
'salary' => 'required|numeric|min:0',
'salary_option' => 'required|string|max:255',
];
}
public function attributes(): array
{
return [
'company_name' => trans('messages.COMPANY_NAME'),
'team_name' => trans('messages.TEAM_NAME'),
'machine_name' => trans('messages.MACHINE_NAME'),
'license_available' => trans('messages.LICENSE_AVAILABLE'),
'license_number' => trans('messages.LICENSE_NUMBER'),
'exp_year' => trans('messages.EXP_YEAR'),
'exp_month' => trans('messages.EXP_YEAR'),
'bio' => trans('messages.BIO'),
'technical_skills' => trans('messages.TECHNICAL_SKILLS'),
'address' => trans('messages.ADDRESS'),
'salary' => trans('messages.SALARY'),
'salary_option' => trans('messages.SALARY_OPTION'),
];
}
public function messages(): array
{
return [
'company_name.required' => trans('messages.COMPANY_NAME_REQUIRED'),
'company_name.string' => trans('messages.COMPANY_NAME_STRING'),
'company_name.max' => trans('messages.COMPANY_NAME_MAX'),
'team_name.required' => trans('messages.TEAM_NAME_REQUIRED'),
'team_name.string' => trans('messages.TEAM_NAME_STRING'),
'team_name.max' => trans('messages.TEAM_NAME_MAX'),
'machine_name.required' => trans('messages.MACHINE_NAME_REQUIRED'),
'machine_name.string' => trans('messages.MACHINE_NAME_STRING'),
'machine_name.max' => trans('messages.MACHINE_NAME_MAX'),
'license_available.required' => trans('messages.LICENSE_AVAILABLE_REQUIRED'),
'license_number.required' => trans('messages.LICENSE_NUMBER_REQUIRED'),
'license_number.string' => trans('messages.LICENSE_NUMBER_STRING'),
'license_number.max' => trans('messages.LICENSE_NUMBER_MAX'),
'exp_year.numeric' => trans('messages.EXP_YEAR_NUMERIC'),
'exp_year.min' => trans('messages.EXP_YEAR_MIN'),
'exp_month.numeric' => trans('messages.EXP_MONTH_NUMERIC'),
'exp_month.min' => trans('messages.EXP_MONTH_MIN'),
'salary.numeric' => trans('messages.SALARY_NUMERIC'),
'salary.min' => trans('messages.SALARY_MIN'),
'salary_option.numeric' => trans('messages.SALARY_OPTION_NUMERIC'),
'salary_option.min' => trans('messages.SALARY_OPTION_MIN'),
'bio.required' => trans('messages.BIO_REQUIRED'),
'bio.string' => trans('messages.BIO_STRING'),
'bio.max' => trans('messages.BIO_MAX'),
'technical_skills.required' => trans('messages.TECHNICAL_SKILLS_REQUIRED'),
'technical_skills.string' => trans('messages.TECHNICAL_SKILLS_STRING'),
'technical_skills.max' => trans('messages.TECHNICAL_SKILLS_MAX'),
'address.required' => trans('messages.ADDRESS_REQUIRED'),
'address.string' => trans('messages.ADDRESS_STRING'),
'address.max' => trans('messages.ADDRESS_MAX'),
];
}
}