Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

Neeraj1005's avatar

@sinnbeck after using this, this error comes.

Facade\Ignition\Exceptions\ViewException
syntax error, unexpected '}', expecting ')' (View: C:\xampp\htdocs\cms\resources\views\admin\trash\userbin.blade.php)
1 like
vandan's avatar
vandan
Best Answer
Level 13

@neeraj1005

try to route name pass

for example

<li><a href="{{ route('restore',$user->id) }}">Restore</a></li>

route name

Route::get('admin/users/restore/{id}','Admin\ListUserController@userRestore')->name('restore');
2 likes
Sinnbeck's avatar

Oh sorry typo (or do as @van1310 suggests)

<li><a href="{{ url('admin/users/restore/' .$user->id) }}">Restore</a></li>
1 like
Neeraj1005's avatar

@van1310 It works: finally solved thanks.

@sinnbeck This is not working and gives an bracket error

<li><a href="{{ url('admin/users/restore/' .$user->id') }}">Restore</a></li>
vandan's avatar

@neeraj1005

ya sure

Let's suppose you are using the same URL in 10 different place and later on, you decide to change it. If you're using named route you have to modify URL only in route file and all links will still work.

sometime confict happen so thats why use name route more information check out laravel documentation best way to learn

1 like
Previous

Please or to participate in this conversation.