S
S
sorry_i_noob2018-12-26 21:45:42
phpstorm
sorry_i_noob, 2018-12-26 21:45:42

Why doesn't PhpStorm understand blade directives in a Laravel project?

Hello. I have Blade directives in a Laravel project underlined. I hover over them and messages appear.
For example, I point to
@if (Route::has('login'))
AND I get
Directive is not closed
Although it is closed.
I direct on
@else
And I receive
Missing opening directive
Though the opening directive is.
Why is that? I am attaching screenshots. Laravel Plugin is worth it, Blade Support is worth it, _ide_helper.php is worth it.

screenshots of PhpStorm messages
5c23cb96f241f722397550.png5c23cb9e44317134793444.png5c23cbaa9942a606222155.png5c23cbb025a89032194018.png
screenshot of plugin window
5c23cc3b783f9860186426.png

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Anton, 2018-12-26
@Yadalay

Replace @else with @elseauth
This was added in Laravel 5.6.14 .

K
Konstantin Eliseev, 2019-08-07
@K0r5hun

Faced about the same problem, only wrote cannot find declaration to go.
Reloading composera helped:
composer dump-autoload -o

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question