Closed heshamwatany closed 1 year ago
Hello,
Thank you for using creative TIM!
You should be able to find what you need in the original code of the template. You can find the pagination that works here --> https://www.creative-tim.com/live/argon-dashboard-pro-laravel
Best.
The pagination exists in form of HTML not in laravel way of implementation
Now the project is using the pagination from Datatables Bootstrap5 as you can see in the index.blade.php of category, tag, user, item and role files. To change to Laravel pagination you will need to follows some steps:
and in the function boot add this change public function boot() { Paginator::useBootstrap(); }
For your table, go to the controller associated with it, for example if I want to add Laravel pagination to User table you will got to app/Http/Controllers/UserController and in the funtion index I will make the update to public function index(User $model) { $this->authorize('manage-users', User::class); return view('laravel.users.index', ['users' => $model->paginate(5)]); }
Now you can go to your table in resources/laravel/users/index.blade.php and add after you closing tab for {{ $users->links() }}
In the same resources/laravel/users/index.blade.php file, where the @push('js') takes place you will need to remove the pagination from the Datatable Bootstrap 5 by adding paging: false`` like this
Let us know if that helps.
It works thanks you very much
Prerequisites
Please answer the following questions for yourself before submitting an issue.
Expected Behavior
To add laravel way of pagination links in blade and it works normally
Current Behavior
it is not sync with the current implementations, the page number in items sample page is not dynamic and cant sync it with normal pagination
Failure Information (for bugs)
Please help provide information about the failure if this is a bug. If it is not a bug, please remove the rest of this template.
Steps to Reproduce
Please provide detailed steps for reproducing the issue.
Context
Failure Logs
Please include any relevant log snippets or files here.