phpvms/app/Http/Requests/CreateAirlineRequest.php

19 lines
341 B
PHP
Raw Normal View History

2017-06-09 09:02:52 +08:00
<?php
namespace App\Http\Requests;
use App\Contracts\FormRequest;
2017-06-20 00:50:25 +08:00
use App\Models\Airline;
2017-06-09 09:02:52 +08:00
2017-06-20 00:50:25 +08:00
class CreateAirlineRequest extends FormRequest
2017-06-09 09:02:52 +08:00
{
public function rules(): array
2017-06-09 09:02:52 +08:00
{
2017-12-31 04:37:10 +08:00
$rules = Airline::$rules;
$rules['iata'] .= '|unique:airlines';
$rules['icao'] .= '|unique:airlines';
2017-12-31 04:37:10 +08:00
return $rules;
2017-06-09 09:02:52 +08:00
}
}