UserController.php 880 B

12345678910111213141516171819202122232425262728293031323334353637
  1. <?php
  2. namespace Apps\Modules\Admin\Controllers;
  3. use Cygnite\Mvc\View\Widget;
  4. use Cygnite\Foundation\Application;
  5. use Apps\Modules\Admin\Models\User;
  6. use Cygnite\Mvc\Controller\AbstractBaseController;
  7. class UserController extends AbstractBaseController
  8. {
  9. /*
  10. * Your constructor.
  11. * @access public
  12. *
  13. */
  14. public function __construct()
  15. {
  16. parent::__construct();
  17. }
  18. /**
  19. * Default method for your controller. Render widget and return
  20. * @access public
  21. *
  22. */
  23. public function indexAction($id)
  24. {
  25. $users = array();
  26. //$users = User::all();
  27. return Widget::make('admin:user', function ($widget)
  28. {
  29. return $widget->render(true); // If you pass true Widget will understand you are trying to access widget
  30. }, array('greet' => 'Hello! Widget'));
  31. }
  32. }//End of your controller