2024-03-28 14:52:40 +05:30
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
namespace App\Http\Requests;
|
|
|
|
|
|
|
|
|
|
use Illuminate\Foundation\Http\FormRequest;
|
|
|
|
|
|
|
|
|
|
class StoreMeetingRequest 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 [
|
|
|
|
|
'leads_id' => 'required',
|
|
|
|
|
'location' => 'required',
|
|
|
|
|
'from' => 'required',
|
|
|
|
|
'to' => 'required',
|
|
|
|
|
'host' => 'required',
|
|
|
|
|
'priority' => 'required',
|
|
|
|
|
'participants' => 'required',
|
|
|
|
|
'related_to' => 'required',
|
|
|
|
|
];
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public function messages(){
|
|
|
|
|
return [
|
|
|
|
|
'required' => 'The :attribute field must be required'
|
|
|
|
|
];
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public function validated(){
|
|
|
|
|
return array_merge(parent::validated(), [
|
|
|
|
|
'status' => $this->status ? '1' : '0',
|
2024-04-25 10:51:37 +05:30
|
|
|
'created_by' => auth()->user()->id,
|
2024-04-26 18:40:07 +05:30
|
|
|
'type' => 'Meeting',
|
2024-03-28 14:52:40 +05:30
|
|
|
]);
|
|
|
|
|
}
|
|
|
|
|
}
|