久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

Laravel 5 Form::model(...) 默認(rèn)轉(zhuǎn)義?

Laravel 5 Form::model(...) escaped by default?(Laravel 5 Form::model(...) 默認(rèn)轉(zhuǎn)義?)
本文介紹了Laravel 5 Form::model(...) 默認(rèn)轉(zhuǎn)義?的處理方法,對(duì)大家解決問題具有一定的參考價(jià)值,需要的朋友們下面隨著小編來一起學(xué)習(xí)吧!

問題描述

也許這是我遺漏的一件簡單的事情,但在我的 laravel 刀片模板中,我有類似的東西:

Maybe this is a simple thing that I'm missing, but in my laravel blade template I have something like:

{{ Form::model(....) }}
    ... my fields ...
{{ Form::close() }}

這會(huì)產(chǎn)生轉(zhuǎn)義的 HTML,因此表單標(biāo)簽實(shí)際上會(huì)打印到屏幕上.但是,如果我這樣做:

This results with escaped HTML so the form tag is actually printed to the screen. However, if I do:

{!! Form::model(....) !!}
    ... my fields ...
{!! Form::close() !!}

它按預(yù)期工作.我是否總是需要使用 {!!... !!} 輸出 html 時(shí)?我讀過的所有教程都只是使用 {{ Form::model(...) }} 的常規(guī)約定來打開表單.感謝您的任何建議!使用 Laravel 5 fwiw.

it works as expected. Do I always need to use the {!! ... !!} when outputting html? All the tutorials I've read up on just show using the normal convention of {{ Form::model(...) }} to open the form. Thanks for any advice! Using Laravel 5 fwiw.

推薦答案

正確.

{{ ... }} 用于原始 html
{{{ ... }}} 用于使用 htmlentities()

{{ ... }} for raw html
{{{ ... }}} for escaping with htmlentities()

<代碼>{!!... !!} 用于原始 html
{{{ ... }}} 用于顯式轉(zhuǎn)義的內(nèi)容
{{ ... }} 用于默認(rèn)行為(也被轉(zhuǎn)義)

{!! ... !!} for raw html
{{{ ... }}} for explicitly escaped content
{{ ... }} for the default behavior (which is escaped as well)

如果您不喜歡它,您可以使用以下方法更改所有 3 個(gè)標(biāo)簽:

If you don't like it you can change all 3 of those tags with these methods:

Blade::setRawTags($openTag, $closeTag);
Blade::setContentTags($openTag, $closeTag);
Blade::setEscapedContentTags($openTag, $closeTag);

要恢復(fù) Laravel 4 處理事物的方式,您可以這樣做:

To restore the way how Laravel 4 handled things, you can do this:

Blade::setRawTags('{{', '}}');
Blade::setEscapedContentTags('{{{', '}}}');

這篇關(guān)于Laravel 5 Form::model(...) 默認(rèn)轉(zhuǎn)義?的文章就介紹到這了,希望我們推薦的答案對(duì)大家有所幫助,也希望大家多多支持html5模板網(wǎng)!

【網(wǎng)站聲明】本站部分內(nèi)容來源于互聯(lián)網(wǎng),旨在幫助大家更快的解決問題,如果有圖片或者內(nèi)容侵犯了您的權(quán)益,請(qǐng)聯(lián)系我們刪除處理,感謝您的支持!

相關(guān)文檔推薦

Laravel Eloquent Union query(Laravel Eloquent Union 查詢)
Overwrite laravel 5 helper function(覆蓋 Laravel 5 輔助函數(shù))
laravel querybuilder how to use like in wherein function(laravel querybuilder 如何在 where 函數(shù)中使用 like)
The Response content must be a string or object implementing __toString(), quot;booleanquot; given after move to psql(響應(yīng)內(nèi)容必須是實(shí)現(xiàn) __toString()、“boolean和“boolean的字符串或?qū)ο?移動(dòng)到 psql 后給出) - IT屋-程
Roles with laravel 5, how to allow only admin access to some root(Laravel 5 的角色,如何只允許管理員訪問某些根)
Laravel Auth - use md5 instead of the integrated Hash::make()(Laravel Auth - 使用 md5 而不是集成的 Hash::make())
主站蜘蛛池模板: 久久精品a级毛片 | 九色 在线 | www国产亚洲精品久久网站 | 国产91久久久久久 | 中文字幕加勒比 | 午夜免费在线 | 欧美在线视频网 | 亚洲二区视频 | 欧美区在线 | 久久精品国产一区 | 亚洲国产精品99久久久久久久久 | 亚洲精品久久久一区二区三区 | 插插宗合网 | 黄毛片| 日韩在线不卡 | 日韩高清中文字幕 | 在线亚州 | 最近中文字幕免费 | av国产在线观看 | 国产91av视频在线观看 | 91干b| 亚洲免费毛片 | 成人毛片网 | 色毛片| 久久久国产精品网站 | 国产成人免费视频网站视频社区 | 国产欧美精品一区二区 | 午夜影院在线观看版 | 一区二区三区四区五区在线视频 | 国产一级毛片视频 | 久久久91 | 精品免费国产一区二区三区四区介绍 | 色婷婷综合久久久中字幕精品久久 | 国产91色在线 | 亚洲 | 亚洲精品久久久久中文字幕欢迎你 | 亚洲精品区 | 亚洲国产成人精品久久久国产成人一区 | 免费在线观看一级毛片 | 国产精品视频网 | 黄a网站 | 91福利在线观看 |