@ if
correct posture so
@if(Auth::user()->id == $article->user_id)
xxx
@endif
-the following is the original question, which we are free to despise-
I want to determine whether it is the user"s own stuff in blade, so I wrote the following code:
@if({{ Auth::user()->id == $article->user_id }})
<a class="ui right floated blue button" href="{{ route("article.edit",$article->id) }}"></a>
<a class="ui right floated red button" href="-sharp"></a>
@endif
but laravel reported an error. The error content is as follows:
syntax error, unexpected "<" (View: D:\website\www\mobook\resources\views\article\index.blade.php)
you can"t find this error symbol that prompts you at all.