src/Http/Requests/PostUpdateRequest.php
public function rules()
    {
        $slug = Post::where('id', $this->route()->post)->pluck('slug');

        return [
            'title' => 'required',
            'slug' => [
                'required',
                Rule::unique(CanvasHelper::TABLES['posts'])->ignore($slug->first(), 'slug'),
            ],
            'subtitle' => 'required',
            'published_at' => 'required',
        ];
    }
public function rules()
    {
        $slug = Post::where('id', $this->route()->post)->pluck('slug');

        return [
            'title' => 'required',
            'slug' => [
                'required',
                Rule::unique(CanvasHelper::TABLES['posts'])->ignore($slug->first(), 'slug'),
            ],
            'subtitle' => 'required',
            'published_at' => 'required',
        ];
    }
Get the validation rules that apply to the request.

@return array