Open thirumalai56 opened 7 years ago
withCount first before searching.
like this..
$example = Questions::query(); $example = $questions->with('user', 'images', '...') ->withCount('something');
if(request('key')) { $example = $example->search(request('key'), null, true); }
$example = $example->get();
I have using two tables relation, everything working fine,but withcount relation not working.
This is urgent need of requirement,so any one help is useful. Thanks.