phpvms/app/Http/Requests/CreateAirlineRequest.php
2017-12-30 14:37:10 -06:00

23 lines
412 B
PHP

<?php
namespace App\Http\Requests;
use Illuminate\Foundation\Http\FormRequest;
use App\Models\Airline;
class CreateAirlineRequest extends FormRequest
{
public function authorize()
{
return true;
}
public function rules()
{
$rules = Airline::$rules;
$rules['iata'] .= '|unique:airlines';
$rules['icao'] .= '|unique:airlines';
return $rules;
}
}