Closed merngalaxyprogs closed 11 months ago
It is a normal behavior of Laravel. As an example, if you try the following code somewhere else in your Laravel app it will also return the error:
Profile::query()->with('user')->where('users.firstname')->get();
// Or
Profile::query()->with('user')->where('user.firstname')->get();
Or
Profile::query()->with('user')->addSelect('users.firstname')->get();
// Or
Profile::query()->with('user')->addSelect('user.firstname')->get();
The function with
only eager loads the given relationships but does not inject any joins into your query.
That means Laravel will load all models from your database and all relationships will be loaded in a secondary query. You can check this behavior with telescope from Laravel or some other packages.
Yes of course i totally forgot this point, displaying data is a thing and searching with relationships is another thing. Thanks a lot
I also went into this error on my first usage with this package.
Could you close your issue? :)
Of course bro thanks :)
Hi !
When i use the with method like this
I get an issue when searching
But when i use the left join method like in the examples the search works fine