phpvms/app/Http/Requests/CreateAirportRequest.php
2018-03-19 20:50:40 -05:00

23 lines
367 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;
}
}