Cannot find declaration to go to for unauthenticated()method of Laravel 5.4
In Laravel 5.4, even with IDE Helper installed and working, I can't find the declaration for the unauthenticated() method on line 114 of vendor/laravel/framework/src/Illuminate/Foundation/Exceptions/Handler.php : pressing CTRL+B I get a "Cannot find declaration to go to"
FYI, the declaration is in the app/Exceptions/Handler.php file
Is this a bug? I was having an headache to find this...
请先登录再写评论。
Hi there,
>Is this a bug?
No. Why it should be?
As for me it's just another example of the great Laravel code.
That line 114 says:
... but that class (\Illuminate\Foundation\Exceptions\Handler) simply does NOT have such method. It's only declared in a child class -- in \App\Exceptions\Handler.
It works fine simply because \Illuminate\Foundation\Exceptions\Handler is never used directly -- app specific \App\Exceptions\Handler is always used instead.
Under such circumstances IDE is correct -- unauthenticated() method is not declared in current or parent class or trait (\Illuminate\Foundation\Exceptions\Handler has no parent and does not use any traits).