What's wrong with if in laravel (solved)

Do not use curly braces after

@ 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.

Aug.10,2021

I remember that I also had this problem. Try to check the model layer or controller layer and try


if. You don't need to add {{}}

as template variables.
Menu