syntax error, unexpected token ">" got tired of VSCode blade extensions tbh
I have this code
@if (auth()->user()->isAdmin())
<div class="space-x-2 sm:-my-px sm:flex text-white">
<x-nav-link href="/shipments"
class="px-2 mx-1">
{{ __('est.shipments') }}
</x-nav-link>
</div>
@endif
I do not know why it is generating this err
after changing the type of the file to Blade extension in VSCOde
the file called navigation.blade.php
Is it a VSCode error or do you see this error displayed in the view ?
@vincent15000 the error is in the view itself and the app stopped
@lifesound So it's not related to VSCode.
Have you seen the typo error ?
{{ __('est.shipments') }}
instead of
{{ __('test.shipments') }}
@lifesound Your code seems correct in terms of syntax.
Can you clear your view and try again?
e.g.
php artisan view:clear
@lifesound Is that the only file where you get the error or other files as well?
@tisuchi whole website stopped the error has many blade files without logical reason
@lifesound Then it's a problem in some other place.
Check error details in your laravel.log. Normally it's in storage/logs/ directory.
@lifesound Have you seen my previous comment ?
You have a typo error on this line.
You have written est instead of test.
@vincent15000 If the translation file didn't exist, it would just print est.shipments.
You're getting a syntax error when you're trying to access a translation, so maybe the error is in your translation file. Can you show what the file looks like?
@lifesound Please show the translation for {{ __('est.shipments') }}.
That's not related to VS Code. It's an error in your code. You might have the file lang/en/est/shipments that returns an array or the file itself has a syntax error.
did you touch the nav link component? It could be in there?
Please sign in or create an account to participate in this conversation.