Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

cout post on category in controller laravel

in CategoryController index
$categories = Category::withCount('partners')->get();

property result to access
$category->partners_count 
 
PREVIOUS NEXT
Tagged: #cout #post #category #controller #laravel
ADD COMMENT
Topic
Name
7+3 =