Advertisement
Guest User

Untitled

a guest
Feb 23rd, 2019
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.34 KB | None | 0 0
  1. ##輸出 name 變數的內容
  2. Route::get('greeting', function () {
  3. return view('welcome', ['name' => 'Duicode']);
  4. })
  5. Hello, {{ $name }}
  6.  
  7.  
  8.  
  9. ##預設Blade {{}} 宣告會自動的使用 htmlentities 方法來避免 XSS 攻擊。如果你不想你的資料被轉義,你可以使用下面的語法,但是要注意,小心被攻擊
  10. Hello, {!! $name !!}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement