Skip to content

Commit 887cb61

Browse files
committed
bootstrap 4
1 parent 6b2d2d9 commit 887cb61

25 files changed

+773
-495
lines changed

app/Http/Controllers/UsersManagementController.php

+6-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,12 @@ public function __construct()
3030
*/
3131
public function index()
3232
{
33-
$users = User::paginate(env('USER_LIST_PAGINATION_SIZE'));
33+
$pagintaionEnabled = config('usersmanagement.enablePagination');
34+
if ($pagintaionEnabled) {
35+
$users = User::paginate(config('usersmanagement.paginateListSize'));
36+
} else {
37+
$users = User::all();
38+
}
3439
$roles = Role::all();
3540

3641
return View('usersmanagement.show-users', compact('users', 'roles'));

composer.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
"jeremykenedy/laravel-exception-notifier": "^1.1",
1717
"jeremykenedy/laravel-https": "^1.1",
1818
"jeremykenedy/laravel-logger": "^1.0",
19-
"jeremykenedy/laravel-phpinfo": "^1.1",
19+
"jeremykenedy/laravel-phpinfo": "^1.2",
2020
"jeremykenedy/laravel-roles": "^1.1",
2121
"jeremykenedy/laravel2step": "^1.0",
2222
"jeremykenedy/uuid": "^3.1",

config/laravelPhpInfo.php

+4
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,15 @@
2020
// Optional Roles Middleware
2121
'rolesMiddlware' => ['activated', 'role:admin', 'activity', 'twostep'],
2222

23+
// Switch Between bootstrap 3 `panel` and bootstrap 4 `card` classes
2324
'bootstapVersion' => '4',
2425

2526
// Additional Card classes for styling -
2627
// See: https://getbootstrap.com/docs/4.0/components/card/#background-and-color
2728
// Example classes: 'text-white bg-primary mb-3'
2829
'bootstrapCardClasses' => '',
2930

31+
// Inline CSS
32+
'usePHPinfoCSS' => true,
33+
3034
];

config/usersmanagement.php

+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
<?php
2+
3+
return [
4+
5+
/*
6+
|--------------------------------------------------------------------------
7+
| Laravel-users setting
8+
|--------------------------------------------------------------------------
9+
*/
10+
11+
// Users List Pagination
12+
'enablePagination' => true,
13+
'paginateListSize' => env('USER_LIST_PAGINATION_SIZE', 25),
14+
15+
// Enable Search Users- Uses jQuery Ajax
16+
'enableSearchUsers' => true,
17+
18+
// Users List JS DataTables - not recommended use with pagination
19+
'enabledDatatablesJs' => false,
20+
'datatablesJsStartCount' => 25,
21+
'datatablesCssCDN' => 'https://cdn.datatables.net/1.10.12/css/dataTables.bootstrap.min.css',
22+
'datatablesJsCDN' => 'https://cdn.datatables.net/1.10.12/js/jquery.dataTables.min.js',
23+
'datatablesJsPresetCDN' => 'https://cdn.datatables.net/1.10.12/js/dataTables.bootstrap.min.js',
24+
25+
// Bootstrap Tooltips
26+
'tooltipsEnabled' => true,
27+
'enableBootstrapPopperJsCdn' => true,
28+
'bootstrapPopperJsCdn' => 'https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js',
29+
30+
31+
];

0 commit comments

Comments
 (0)