File tree Expand file tree Collapse file tree 2 files changed +34
-1
lines changed Expand file tree Collapse file tree 2 files changed +34
-1
lines changed Original file line number Diff line number Diff line change @@ -77,6 +77,7 @@ was pretty tough. So i decided to create a much more easier way of communicating
7777 * [ Pagination Showing] ( #pagination-showing )
7878 * [ Pagination Showing Config] ( #pagination-showing-config )
7979 * [ Pagination Foreach Numbers] ( #pagination-foreach-numbers )
80+ * [ Pagination Ajax Loading] ( #pagination-ajax-loading )
8081 * [ Get Pagination] ( #get-pagination )
8182* [ Clause] ( #clause )
8283 * [ query] ( #query )
@@ -790,6 +791,38 @@ foreach($users as $user){
790791}
791792```
792793
794+ ### Pagination Ajax Loading
795+ - When the view is either ` loading| ` \| ` onloading `
796+ - This can automatically fetched data without page load
797+ - You need to give your DOM-element ` data-pagination-content ` and ` data-pagination-append `
798+
799+ ``` php
800+ $users = DB::table('users')->paginate(20);
801+ ```
802+
803+ ``` html
804+ <div data-pagination-content >
805+ <div class =" wallet-container" data-pagination-append >
806+ <?php foreach($users as $user) {?>
807+ <!-- Content to be loaded structure -->
808+ <?php }?>
809+ </div >
810+ </div >
811+
812+ or
813+
814+ <div data-pagination-content data-pagination-append >
815+ <!-- Content to be loaded structure -->
816+ </div >
817+
818+ <!-- pagination links -->
819+ <div >
820+ <?= $users->links([
821+ 'no_content' => 'All users have been loaded.'
822+ ]); ?>
823+ </div >
824+ ```
825+
793826### Get Pagination
794827- Returns pagination informations
795828
Original file line number Diff line number Diff line change 124124 <!-- pagination links -->
125125 <div>
126126 <?= $ wallets ->links ([
127- 'no_content ' => 'All Wallets has been loaded. '
127+ 'no_content ' => 'All Wallets have been loaded. '
128128 ]); ?>
129129 </div>
130130</body>
You can’t perform that action at this time.
0 commit comments