app/Http/Requests/BlogRequest.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 [
            'blog_title' => 'required|unique:mysql2.blogs',
            'blog_short_description' => 'required|max:250',
            'blog_description' => 'required',
            'blog_image' => 'required|max:2048|mimes:jpeg,jpg,png,gif',
            'category_id' => 'required|array',
            'tags_id' => 'required|array',
            'blog_seo_title' => 'nullable',
            'blog_seo_keyword' => 'nullable',
            'blog_seo_description' => 'nullable'
        ];
    }
public function rules ( ) { return [ 'blog_title' => 'required|unique:mysql2.blogs' , 'blog_short_description' => 'required|max:250' , 'blog_description' => 'required' , 'blog_image' => 'required|max:2048|mimes:jpeg,jpg,png,gif' , 'category_id' => 'required|array' , 'tags_id' => 'required|array' , 'blog_seo_title' => 'nullable' , 'blog_seo_keyword' => 'nullable' , 'blog_seo_description' => 'nullable' ] ; }
Get the validation rules that apply to the request.
Get the validation rules that apply to the request .