Skip to content

Paginating Multiple Results - user Guides #196

Description

@titounnes

// In the Controller
public function index()
{
$userModel = new \App\Models\UserModel();
$pageModel = new \App\Models\PageModel();

$data = [
    'users' => $userModel->paginate(10, 'group1'),
    'pages' => $pageModel->paginate(15, 'group2'),
    'pager' => $model->pager
];

echo view('users/index', $data);

}

// In the views:

links('group1') ?> simpleLinks('group2') ?>

We have 2 models, $userModel and $page model. $model in data-pager not exists in this method

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugVerified issues on the current code behavior or pull requests that will fix themdocumentationPull requests for documentation only

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions