public function tree()
    {
        $items = $this->model
            ->orderBy('id')
            ->orderBy('parent_id')
            ->with($this->with)
            ->get(['id', 'title', 'parent_id'])
            ->toArray();

        return $this->toTree($items);
    }
public function tree()
    {
        $items = $this->model
            ->orderBy('id')
            ->orderBy('parent_id')
            ->with($this->with)
            ->get(['id', 'title', 'parent_id'])
            ->toArray();

        return $this->toTree($items);
    }
public function tree ( ) { $ items = $ this -> model -> orderBy ( 'id' ) -> orderBy ( 'parent_id' ) -> with ( $ this -> with ) -> get ( [ 'id' , 'title' , 'parent_id' ] ) -> toArray ( ) ; return $ this -> toTree ( $ items ) ; }
Fetch pages tree

@return array
Fetch pages tree