<?php

namespace App\Http\Requests;

use Illuminate\Foundation\Http\FormRequest;

class TakeLeaveRequest extends FormRequest
{
    /**
     * Determine if the user is authorized to make this request.
     *
     * @return bool
     */
    public function authorize()
    {
        return auth()->check();
    }

    /**
     * Get the validation rules that apply to the request.
     *
     * @return array
     */
    public function rules()
    {
        return [
            'select2_ajax_emp_id' =>'required',
            'request_to' =>'required',
            'leave_type' =>'required',
            'from_date' =>'required',
            'to_date' =>'required',
        ];
    }
}
