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.
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e496e0-43a6b.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e496e0-43a6b.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?