public function view(UserViewerListener $listener, array $input = [])
    {
        $search = [
            'keyword' => $input['q'] ?? '',
            'roles' => $input['roles'] ?? [],
        ];

        // Get Users (with roles) and limit it to only 30 results for
        // pagination. Don't you just love it when pagination simply works.
        $eloquent = Foundation::make('orchestra.user')->search($search['keyword'])->hasRolesId($search['roles']);
        $roles = Foundation::make('orchestra.role')->pluck('name', 'id');

        // Build users table HTML using a schema liked code structure.
        $table = $this->presenter->table($eloquent);

        Event::dispatch('orchestra.list: users', [$eloquent, $table]);

        // Once all event listening to `orchestra.list: users` is executed,
        // we can add we can now add the final column, edit and delete
        // action for users.
        $this->presenter->actions($table);

        $data = [
            'eloquent' => $eloquent,
            'roles' => $roles,
            'table' => $table,
            'search' => $search,
        ];

        return $listener->showUsers($data);
    }
public function view(UserViewerListener $listener, array $input = [])
    {
        $search = [
            'keyword' => $input['q'] ?? '',
            'roles' => $input['roles'] ?? [],
        ];

        // Get Users (with roles) and limit it to only 30 results for
        // pagination. Don't you just love it when pagination simply works.
        $eloquent = Foundation::make('orchestra.user')->search($search['keyword'])->hasRolesId($search['roles']);
        $roles = Foundation::make('orchestra.role')->pluck('name', 'id');

        // Build users table HTML using a schema liked code structure.
        $table = $this->presenter->table($eloquent);

        Event::dispatch('orchestra.list: users', [$eloquent, $table]);

        // Once all event listening to `orchestra.list: users` is executed,
        // we can add we can now add the final column, edit and delete
        // action for users.
        $this->presenter->actions($table);

        $data = [
            'eloquent' => $eloquent,
            'roles' => $roles,
            'table' => $table,
            'search' => $search,
        ];

        return $listener->showUsers($data);
    }
public function view ( UserViewerListener $ listener , array $ input = [ ] ) { $ search = [ 'keyword' => $ input [ 'q' ] ?? '' , 'roles' => $ input [ 'roles' ] ?? [ ] , ] ; // Get Users (with roles) and limit it to only 30 results for // pagination. Don't you just love it when pagination simply works. $ eloquent = Foundation :: make ( 'orchestra.user' ) -> search ( $ search [ 'keyword' ] ) -> hasRolesId ( $ search [ 'roles' ] ) ; $ roles = Foundation :: make ( 'orchestra.role' ) -> pluck ( 'name' , 'id' ) ; // Build users table HTML using a schema liked code structure. $ table = $ this -> presenter -> table ( $ eloquent ) ; Event :: dispatch ( 'orchestra.list: users' , [ $ eloquent , $ table ] ) ; // Once all event listening to `orchestra.list: users` is executed, // we can add we can now add the final column, edit and delete // action for users. $ this -> presenter -> actions ( $ table ) ; $ data = [ 'eloquent' => $ eloquent , 'roles' => $ roles , 'table' => $ table , 'search' => $ search , ] ; return $ listener -> showUsers ( $ data ) ; }
View list users page.

@param  \Orchestra\Contracts\Foundation\Listener\Account\UserViewer  $listener
@param  array  $input

@return mixed
View list users page .