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

22 lines
366 B
PHP

<?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()
{
$rules = Airport::$rules;
$rules['icao'] .= '|unique:airports';
return $rules;
}
}