I was wondering if support for the return of app() can be added.
app() can be used for getting an injected model, and it is quite common to use it in situations where dependency injection via controller or constructor is not possible.
I would love to see this autocompleted:
class Foo {
public function getBar() {
return 1;
}
}
$foo = app(Foo::class);
// $foo is not recognized as Foo::class, therefore getBar() is not autocompleted
$foo->getBar();
// Current workaround is adding the following comment:
/** @var Foo $foo */
$foo = app(Foo::class);
$foo->getBar();
Hello,
I was wondering if support for the return of
app()
can be added.app()
can be used for getting an injected model, and it is quite common to use it in situations where dependency injection via controller or constructor is not possible.I would love to see this autocompleted:
Would this be something that can be added?
Thank you