The Code Inspector of my PhpStorm 2016.1.2 (with Laravel Plugin installed) says about the following code.
<?php
$this->app['router']->group(
['namespace' => 'Foo\Access\Controllers'],
function() {
$this->app['router']->post('auth/login', ['uses' => 'AuthController@login']);
}
);
How can I tell PhpStorm that $this-app['router']
references to Illuminate\Routing\Router
?
The solution was very simple. I changed the array access of the object.
<?php
$this->app->router->group(
['namespace' => 'Foo\Access\Controllers'],
function() {
$this->app->router->post('auth/login', ['uses' => 'AuthController@login']);
}
);