phpvms/app/Http/Requests/CreateAirportRequest.php

22 lines
366 B
PHP
Raw Normal View History

<?php
namespace App\Http\Requests;
use App\Models\Airport;
use Illuminate\Foundation\Http\FormRequest;
class CreateAirportRequest extends FormRequest
{
public function authorize()
{
return true;
}
public function rules()
{
2017-12-31 04:37:10 +08:00
$rules = Airport::$rules;
$rules['icao'] .= '|unique:airports';
return $rules;
}
}