get count of relationship table laravel

Solutions on MaxInterview for get count of relationship table laravel by the best coders in the world

showing results for - "get count of relationship table laravel"
Julian
03 Feb 2019
1Category::where('parent_id', 0)->withCount('articles')->get();
2