. */ include_once __DIR__.'/../../core.php'; use Modules\Articoli\Articolo; use Modules\Articoli\Categoria; $subcategorie = Categoria::where('parent', '=', $id_record)->get(); foreach ($subcategorie as $sub) { $n_articoli = Articolo::where('id_sottocategoria', '=', $sub['id'])->count(); echo ' '.$sub->getTranslation('name').' '.$sub->colore.' '.$sub->nota.' '; }