<?php

namespace App\Http\Requests;

use Illuminate\Foundation\Http\FormRequest;
use Validator;

class RainsPost 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()
    {
        $rules = [];

        // if ($this->main_traffic == "1") {
        //     $rules_base['main_traffic_line'] = 'required';
        //     $rules_base['main_traffic_station'] = 'required';
        //     $rules_base['main_traffic_time'] = 'required|integer';
        // } elseif($this->main_traffic == "2") {
        //     $rules_base['main_traffic_bus_time'] = 'required|integer';
        //     $rules_base['main_traffic_bus'] = 'required';
        //     $rules_base['main_traffic_bus_walk'] = 'required|integer';
        // }

        return $rules;
    }
}
