app\models\Menu::children PHP Метод

children() публичный Метод

public children ( )
    public function children()
    {
        // Root is the parent of itself therefore also a child of itself.
        // This can create an infinite loop so we must forcibly remove
        // that entry here.
        $kids = $this->hasMany('App\\Models\\Menu', 'parent_id')->where('name', '!=', 'root')->orderBy('position', 'ASC')->orderBy('label', 'ASC')->orderBy('id', 'ASC');
        return $kids;
    }