app/Http/Requests/UpdatePageRequest.php
/**
     * Get the validation rules that apply to the request.
     *
     * @return array
     */
Get the validation rules that apply to the request.
@return array
Get the validation rules that apply to the request . @return array
public function rules()
    {
        return [
            'page_title' => 'required|unique:mysql2.pages,page_title,'.$this->page->id,
            'page_description',
            'page_image' => 'nullable|max:2048|mimes:jpeg,jpg,png,gif',
            'page_seo_title' => 'nullable',
            'page_seo_description' => 'nullable',
            'page_seo_keyword' => 'nullable',
        ];
    }
public function rules ( ) { return [ 'page_title' => 'required|unique:mysql2.pages,page_title,' . $ this -> page -> id , 'page_description' , 'page_image' => 'nullable|max:2048|mimes:jpeg,jpg,png,gif' , 'page_seo_title' => 'nullable' , 'page_seo_description' => 'nullable' , 'page_seo_keyword' => 'nullable' , ] ; }
Get the validation rules that apply to the request.
Get the validation rules that apply to the request .