Exemplo n.º 1
0
 /**
  * Display a listing of the resource.
  *
  * @param Request $r
  * @return \Illuminate\Http\Response
  */
 public function index(Request $r)
 {
     $withChildren = (bool) $r->get('withChildren', false);
     if ($withChildren) {
         $root = Node::all()->toHierarchy();
     } else {
         $root = Node::roots()->get();
     }
     return Response::json($root);
 }
Exemplo n.º 2
0
 public function index()
 {
     $nodes = Node::all();
     return $this->view()->assign('nodes', $nodes)->display('admin/node.tpl');
 }
Exemplo n.º 3
0
 public function node()
 {
     $nodes = Node::all();
     return $this->view()->assign('nodes', $nodes)->display('user/node.tpl');
 }
Exemplo n.º 4
0
 public function index($request, $response, $args)
 {
     $nodes = Node::all();
     return $this->view()->assign('nodes', $nodes)->display('admin/node/index.tpl');
 }