phpvms/app/Http/Requests/UpdatePageRequest.php
Nabeel S 420bd7e4ae
Add ability to use a link instead of a page #750 (#757)
Add ability to use a link instead of a page #750
2020-06-11 08:27:38 -04:00

26 lines
492 B
PHP

<?php
namespace App\Http\Requests;
use App\Contracts\FormRequest;
use Illuminate\Validation\Rule;
class UpdatePageRequest extends FormRequest
{
/**
* Get the validation rules that apply to the request.
*
* @return array
*/
public function rules(): array
{
return [
'name' => [
'required',
Rule::unique('pages')->ignore($this->id, 'id'),
],
'body' => 'nullable',
];
}
}