plugin
plugin copied to clipboard
[Bug]: paginate autocomplete is not working : auth()->user()->products()->paginate(10)
Bug description
Dear support I have a products module that has belongTo relation to the user, and the user module has HasMany relations.
User Module
public function products()
{
return $this->hasMany(Products::class);
}
Products
public function user()
{
return $this->belongsTo(User::class);
}
Now in the ProductController
public function index()
{
return response()->json([
'product_list' => auth()->user()->products()->paginate(10),
]);
}
It works just fine, but
The autocomplete for the pagination is not available in the menu!

Plugin version
5.7.3.221
Operating system
Windows
Steps to reproduce
No response
Relevant log output
No response


Hello.
I could reproduce this. It appears only for Auth::user() and similar calls when Laravel Idea helps PhpStorm to understand the type(App/Models/User). I think it's on PhpStorm side. I'll try to create an issue in their bugtracker.
Did you report this? @adelf Since it is really annoying that phpstrom dos not follow / understand the type(App/Models/User).
Hello.
I could reproduce this. It appears only for Auth::user() and similar calls when Laravel Idea helps PhpStorm to understand the type(App/Models/User). I think it's on PhpStorm side. I'll try to create an issue in their bugtracker.
Hello, any updates on this?
Seems it was fixed. PhpStorm 2023.3: