. */ 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('title').' '.$sub->colore.' '.$sub->getTranslation('note').' '; }