-1

我正在尝试将ar语言添加到我的网站,但我有一个问题,身体没有保存它保存<p>&nbsp;&nbsp;</p>

我已经打印了使用 2 种语言aren更新帖子时如何接收它的请求。

请求是这样的,带有一些虚拟文本

Request {#57 ▼
  #json: null
  #convertedFiles: array:2 [▶]
  #userResolver: Closure {#1935 ▶}
  #routeResolver: Closure {#1994 ▶}
  +attributes: ParameterBag {#67 ▶}
  +request: ParameterBag {#66 ▼
    #parameters: array:17 [▼
      "_token" => "LjyJ1cgN5tn7yxFbjyHRPAnRzqRKWg8ojRYM7cMP"
      "title_i18n" => "{"en":"Data Services","ar":"خدمة البيانات"}"
      "title" => "Data Services"
      "body_i18n" => "{"ar":""}"
      "body" => """
        <pre style="box-sizing: border-box; font-family: SFMono-Regular, Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 11.9px; margin-top: 0px; mar ▶
                 * Set whether or not the multilingual is supported by the BREAD input.\r\n
                 */\r\n
                'bread' =&gt; true,</code></pre>
        """
      "excerpt_i18n" => "{"en":"as ds as d","ar":"as das s dsa"}"
      "excerpt" => "as ds as d"
      "slug_i18n" => "{"en":"data-services1","ar":"khdmh-albyanat"}"
      "slug" => "data-services1"
      "status" => "PUBLISHED"
      "category_id" => "3"
      "meta_description_i18n" => "{"en":"as das dsa d","ar":"asd as dasd a"}"
      "meta_description" => "as das dsa d"
      "meta_keywords_i18n" => "{"en":"as das","ar":"a sdas "}"
      "meta_keywords" => "as das"
      "seo_title_i18n" => "{"en":"Design and conduct surveys and measure relevant indicators in all areas","ar":"Design and conduct surveys and measure relevant indicators in all areas"}"
      "seo_title" => "Design and conduct surveys and measure relevant indicators in all areas"
    ]
  }
  +query: ParameterBag {#65 ▶}
  +server: ServerBag {#70 ▶}
  +files: FileBag {#69 ▶}
  +cookies: ParameterBag {#68 ▶}
  +headers: HeaderBag {#71 ▶}
  #content: null
  #languages: null
  #charsets: null
  #encodings: null
  #acceptableContentTypes: null
  #pathInfo: "/admin/posts"
  #requestUri: "/admin/posts"
  #baseUrl: ""
  #basePath: null
  #method: "POST"
  #format: null
  #session: Store {#2051 ▶}
  #locale: null
  #defaultLocale: "en"
  -isHostValid: true
  -isForwardedValid: true
  basePath: ""
  format: "html"
}

我的多语言配置的 voyager.php 是这样的

'multilingual' => [
    /*
     * Set whether or not the multilingual is supported by the BREAD input.
     */
    'bread' => true,
    /*
     * Set whether or not the multilingual is supported by the BREAD input.
     */
    'enabled' => true,

    /*
     * Set whether or not the admin layout default is RTL.
     */
    'rtl' => false,

    /*
     * Select default language
     */
    'default' => 'en',

    /*
     * Select languages that are supported.
     */
    'locales' => [
        'en',
        'ar',
    ],
],

会有什么问题?

4

1 回答 1

-1

我找了很多,最后我试图通过转身来解决它。解决方案或假设这里的问题在此文件中:

帖子/添加-edit.blade.php

如果您删除它,面包将与帖子添加编辑的默认模板完美配合。我认为这会有所帮助,但我不知道为什么会出现这个问题。

于 2018-05-14T11:52:50.690 回答