phpvms/app/Http/Requests/Acars/PrefileRequest.php
2018-02-10 16:00:43 -06:00

46 lines
1.4 KiB
PHP

<?php
namespace App\Http\Requests\Acars;
use Illuminate\Foundation\Http\FormRequest;
/**
* Class PrefileRequest
* @package App\Http\Requests\Acars
*/
class PrefileRequest extends FormRequest
{
public function authorize()
{
return true;
}
public function rules()
{
$rules = [
'airline_id' => 'required|exists:airlines,id',
'aircraft_id' => 'required|exists:aircraft,id',
'flight_number' => 'required',
'level' => 'required|numeric',
'dpt_airport_id' => 'required',
'arr_airport_id' => 'required',
'source_name' => 'required|max:25',
'route_code' => 'nullable',
'route_leg' => 'nullable',
'distance' => 'nullable|numeric',
'flight_time' => 'nullable|integer',
'planned_distance' => 'nulled|numeric',
'planned_flight_time' => 'nullable|integer',
'zfw' => 'nullable|numeric',
'block_fuel' => 'nullable|numeric',
'route' => 'nullable',
'notes' => 'nullable',
'flight_type' => 'nullable|integer',
'created_at' => 'nullable|date',
];
return $rules;
}
}