![](/img/trans.png)
[英]How do I fix “syntax error, unexpected end of file” on my edit.blade.php?
[英]How do I keep my indentation for the blade syntax in PHPStorm?
我從* .blade.php文件中復制以下代碼:
@section('content')
<h1>All Users</h1>
@if ($users->isEmpty())
<h2>No Users Found</h2>
@else
@foreach ($users as $user)
<li>{{ link_to("/users/{$user->username}", $user->username) }}</li>
@endforeach
@endif
@stop
這是它粘貼到同一文件時的顯示方式:
@section('content')
<h1>All Users</h1>
@if ($users->isEmpty())
<h2>No Users Found</h2>
@else
@foreach ($users as $user)
<li>{{ link_to("/users/{$user->username}", $user->username) }}</li>
@endforeach
@endif
@stop
我假設某處的代碼樣式正在刪除刀片語法的縮進,但我找不到哪一個。 我需要改變什么設置?
一般來說:
Settings (Preferences on Mac) | Editor | Smart Keys | Reformat on Paste
為什么“一般” - 因為PhpStorm中還沒有適當的刀片支持(但很快就會出現)因此沒有單獨的格式化程序規則。 因此,上述選項很可能是負責此類行為的選項。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.