2017-06-23 09:55:45 +08:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace App\Http\Requests;
|
|
|
|
|
2020-03-29 01:03:52 +08:00
|
|
|
use App\Contracts\FormRequest;
|
2017-06-23 09:55:45 +08:00
|
|
|
use App\Models\Subfleet;
|
|
|
|
|
2017-06-24 06:33:18 +08:00
|
|
|
class CreateSubfleetRequest extends FormRequest
|
2017-06-23 09:55:45 +08:00
|
|
|
{
|
|
|
|
/**
|
|
|
|
* Get the validation rules that apply to the request.
|
2018-08-27 00:40:04 +08:00
|
|
|
*
|
2017-06-23 09:55:45 +08:00
|
|
|
* @return array
|
|
|
|
*/
|
2018-03-22 01:35:06 +08:00
|
|
|
public function rules(): array
|
2017-06-23 09:55:45 +08:00
|
|
|
{
|
2018-03-22 01:35:06 +08:00
|
|
|
$rules = Subfleet::$rules;
|
|
|
|
$rules['type'] .= '|unique:subfleets';
|
|
|
|
return $rules;
|
2017-06-23 09:55:45 +08:00
|
|
|
}
|
|
|
|
}
|