app/Http/Requests/UserAvatarRequest.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 [
            'avatar'            => 'sometimes|image|mimes:jpeg,bmp,png',
            'custom_avatar'     => 'required|boolean'
        ];
    }
public function rules ( ) { return [ 'avatar' => 'sometimes|image|mimes:jpeg,bmp,png' , 'custom_avatar' => 'required|boolean' ] ; }
Get the validation rules that apply to the request.
Get the validation rules that apply to the request .