public function getIndex()
    {
        $emptyGroup =  Sentry::getGroupProvider()->createModel();

        // Ajax search
        $groupId = Input::get('groupIdSearch');
        if(!empty($groupId)) {
            $emptyGroup = $emptyGroup->where('id', $groupId);
        }
        $groupname = Input::get('groupnameSearch');
        if(!empty($groupname)) {
            $emptyGroup = $emptyGroup->where('name', 'LIKE', '%'.$groupname.'%');
        }

        $groups = $emptyGroup->paginate(Config::get('syntara::config.item-perge-page'));

        // ajax: reload only the content container
        if(Request::ajax()) {
            $html = View::make(Config::get('syntara::views.groups-list'), array('groups' => $groups))->render();

            return Response::json(array('html' => $html));
        }

        $this->layout = View::make(Config::get('syntara::views.groups-index'), array('groups' => $groups));
        $this->layout->title = trans('syntara::groups.titles.list');
        $this->layout->breadcrumb = Config::get('syntara::breadcrumbs.groups');
    }
public function getIndex()
    {
        $emptyGroup =  Sentry::getGroupProvider()->createModel();

        // Ajax search
        $groupId = Input::get('groupIdSearch');
        if(!empty($groupId)) {
            $emptyGroup = $emptyGroup->where('id', $groupId);
        }
        $groupname = Input::get('groupnameSearch');
        if(!empty($groupname)) {
            $emptyGroup = $emptyGroup->where('name', 'LIKE', '%'.$groupname.'%');
        }

        $groups = $emptyGroup->paginate(Config::get('syntara::config.item-perge-page'));

        // ajax: reload only the content container
        if(Request::ajax()) {
            $html = View::make(Config::get('syntara::views.groups-list'), array('groups' => $groups))->render();

            return Response::json(array('html' => $html));
        }

        $this->layout = View::make(Config::get('syntara::views.groups-index'), array('groups' => $groups));
        $this->layout->title = trans('syntara::groups.titles.list');
        $this->layout->breadcrumb = Config::get('syntara::breadcrumbs.groups');
    }
public function getIndex ( ) { $ emptyGroup = Sentry :: getGroupProvider ( ) -> createModel ( ) ; // Ajax search $ groupId = Input :: get ( 'groupIdSearch' ) ; if ( ! empty ( $ groupId ) ) { $ emptyGroup = $ emptyGroup -> where ( 'id' , $ groupId ) ; } $ groupname = Input :: get ( 'groupnameSearch' ) ; if ( ! empty ( $ groupname ) ) { $ emptyGroup = $ emptyGroup -> where ( 'name' , 'LIKE' , '%' . $ groupname . '%' ) ; } $ groups = $ emptyGroup -> paginate ( Config :: get ( 'syntara::config.item-perge-page' ) ) ; // ajax: reload only the content container if ( Request :: ajax ( ) ) { $ html = View :: make ( Config :: get ( 'syntara::views.groups-list' ) , array ( 'groups' => $ groups ) ) -> render ( ) ; return Response :: json ( array ( 'html' => $ html ) ) ; } $ this -> layout = View :: make ( Config :: get ( 'syntara::views.groups-index' ) , array ( 'groups' => $ groups ) ) ; $ this -> layout -> title = trans ( 'syntara::groups.titles.list' ) ; $ this -> layout -> breadcrumb = Config :: get ( 'syntara::breadcrumbs.groups' ) ; }
List of groups
List of groups