Skip to content

Commit a5577e1

Browse files
author
maharshi
committed
set active menu class and seeder for user pagination module
1 parent 15c132b commit a5577e1

File tree

11 files changed

+304
-100
lines changed

11 files changed

+304
-100
lines changed

app/Http/Controllers/APIController.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ class APIController extends Controller
1616
public function users()
1717
{
1818
try{
19-
$users = User::all();
19+
$users = User::latest()->paginate(5);
2020
$response = ['success'=>true,'message' => 'user list !!','data'=>$users];
2121
}catch (\Exception $e){
2222
return [
@@ -84,6 +84,4 @@ public function updateProfile(Request $request)
8484
}
8585
return response()->json($response, 201);
8686
}
87-
88-
8987
}

database/seeds/UserSeeder.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ class UserSeeder extends Seeder
1414
*/
1515
public function run()
1616
{
17+
1718
for ($i=0; $i < 1000; $i++) {
1819
$userData[] = [
1920
'name' => Str::random(8),

package-lock.json

Lines changed: 54 additions & 66 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,8 @@
2626
"sass-loader": "^8.0.0"
2727
},
2828
"dependencies": {
29-
"react-feather": "^2.0.8",
29+
"react-feather": "^2.0.8",
30+
"react-js-pagination": "^3.0.3",
3031
"react-redux": "^7.2.1",
3132
"react-router": "latest",
3233
"react-router-dom": "^5.2.0",

public/images/favicon.svg

Lines changed: 1 addition & 0 deletions
Loading

0 commit comments

Comments
 (0)