| {!! trans('laravelusers::laravelusers.users-table.id') !!} | 88 |{!! trans('laravelusers::laravelusers.users-table.name') !!} | 89 |{!! trans('laravelusers::laravelusers.users-table.email') !!} | 90 | @if(config('laravelusers.rolesEnabled')) 91 | 92 | @endif 93 | 94 | 95 |{!! trans('laravelusers::laravelusers.users-table.actions') !!} | 96 |97 | | 98 | |
|---|---|---|---|---|---|
| {{$user->id}} | 104 |{{$user->name}} | 105 |{{$user->email}} | 106 | @if(config('laravelusers.rolesEnabled')) 107 | 121 | @endif 122 | 123 | 124 |125 | {!! Form::open(array('url' => 'users/' . $user->id, 'class' => '', 'data-toggle' => 'tooltip', 'title' => trans('laravelusers::laravelusers.tooltips.delete'))) !!} 126 | {!! Form::hidden('_method', 'DELETE') !!} 127 | {!! Form::button(trans('laravelusers::laravelusers.buttons.delete'), array('class' => 'btn btn-danger btn-sm','type' => 'button', 'style' =>'width: 100%;' ,'data-toggle' => 'modal', 'data-target' => '#confirmDelete', 'data-title' => trans('laravelusers::modals.delete_user_title'), 'data-message' => trans('laravelusers::modals.delete_user_message', ['user' => $user->name]))) !!} 128 | {!! Form::close() !!} 129 | | 130 |131 | 132 | {!! trans('laravelusers::laravelusers.buttons.show') !!} 133 | 134 | | 135 |136 | 137 | {!! trans('laravelusers::laravelusers.buttons.edit') !!} 138 | 139 | | 140 |
49 | {{ Html::mailto($user->email, $user->email) }} 50 |
51 | @endif 52 |
15 |
16 |
17 | #### Table of contents
18 | - [About](#about)
19 | - [Features](#features)
20 | - [Requirements](#requirements)
21 | - [Integrations](#integrations)
22 | - [Installation Instructions](#installation-instructions)
23 | - [Configuration](#configuration)
24 | - [Routes](#routes)
25 | - [Screenshots](#screenshots)
26 | - [File Tree](#file-tree)
27 | - [Opening an Issue](#opening-an-issue)
28 | - [License](#license)
29 |
30 | ### Features
31 | | Laravel Users Features |
32 | | :------------ |
33 | |Full CRUD of Laravel Users|
34 | |Works with built in [auth scaffolding](https://laravel.com/docs/5.7/authentication)|
35 | |Works with various [Roles/ACL Packages](https://github.com/jeremykenedy/laravel-roles)|
36 | |Uses [Language localization](https://laravel.com/docs/5.7/localization) File System|
37 | |Uses [font awesome](https://fontawesome.com/icons), cdn can be optionally called in config|
38 | |Can use built in [pagination](https://laravel.com/docs/5.7/pagination) and/or [datatables.js](https://datatables.net/)|
39 | |Can search all users by name, id, or email|
40 | |Lots of [configuration](#configuration) options|
41 |
42 |
43 | ### Requirements
44 | * [Laravel 5.2, 5.3, 5.4, 5.5, 5.6, 5.7, 5.8, 6, 7, or 8+](https://laravel.com/docs/installation)
45 |
46 | ### Integrations
47 | Laravel users can work out the box with or without the following roles packages:
48 | * [jeremykenedy/laravel-roles](https://github.com/jeremykenedy/laravel-roles)
49 | * [Zizaco/entrust](https://github.com/Zizaco/entrust)
50 | * [romanbican/roles](https://github.com/romanbican/roles)
51 | * [ultraware/roles](https://github.com/ultraware/roles)
52 |
53 | ### Installation Instructions
54 | 1. From your projects root folder in terminal run:
55 |
56 | Laravel 5.6, 5.7, 5.8, 6, 7, and 8+ use:
57 |
58 | ```
59 | composer require jeremykenedy/laravel-users
60 | ```
61 |
62 | Laravel 5.5 use:
63 |
64 | ```
65 | composer require jeremykenedy/laravel-users:2.0.2
66 | ```
67 |
68 | Laravel 5.4 use:
69 |
70 | ```
71 | composer require jeremykenedy/laravel-users:1.4.0
72 | ```
73 |
74 | Laravel 5.3 use:
75 |
76 | ```
77 | composer require jeremykenedy/laravel-users:1.3.0
78 | ```
79 |
80 | Laravel 5.2 use:
81 | ```
82 | composer require jeremykenedy/laravel-users:1.2.0
83 | ```
84 |
85 | 2. Register Package
86 | * Laravel 5.5, 5.6, 5.7, 5.8, 6, 7, 8+
87 | Uses package auto discovery feature, no need to edit the `config/app.php` file.
88 |
89 | * Laravel 5.4 and below
90 | Register the package with laravel in `config/app.php` under `providers` with the following:
91 |
92 | ```
93 | Collective\Html\HtmlServiceProvider::class,
94 | jeremykenedy\laravelusers\LaravelUsersServiceProvider::class,
95 | ```
96 |
97 | 3. Register the dependencies aliases
98 | * Laravel 5.5 and up
99 | Uses package auto discovery feature, no need to edit the `config/app.php` file.
100 |
101 | * Laravel 5.4 and below
102 | In `config/app.php` section under `aliases` with the following:
103 |
104 | ```
105 | 'Form' => Collective\Html\FormFacade::class,
106 | 'Html' => Collective\Html\HtmlFacade::class,
107 | ```
108 |
109 | 4. Publish the package config and language files by running the following from your projects root folder:
110 |
111 | ```
112 | php artisan vendor:publish --tag=laravelusers
113 | ```
114 |
115 | ### Configuration
116 | Laravel Users can be configured directly in [`/config/laravelusers.php`](https://github.com/jeremykenedy/laravel-users/blob/master/src/config/laravelusers.php) once you publish the assets.
117 |
118 | ```php
119 | /*
120 | |--------------------------------------------------------------------------
121 | | Laravel-users setting
122 | |--------------------------------------------------------------------------
123 | */
124 |
125 | // The parent blade file
126 | 'laravelUsersBladeExtended' => 'laravelusers::layouts.app', // 'layouts.app'
127 |
128 | // Enable `auth` middleware
129 | 'authEnabled' => true,
130 |
131 | // Enable Optional Roles Middleware on the users assignments
132 | 'rolesEnabled' => false,
133 |
134 | /*
135 | | Enable Roles Middlware on the usability of this package.
136 | | This requires the middleware from the roles package to be registered in `App\Http\Kernel.php`
137 | | An Example: of roles middleware entry in protected `$routeMiddleware` array would be:
138 | | 'role' => \jeremykenedy\LaravelRoles\Middleware\VerifyRole::class,
139 | */
140 |
141 | 'rolesMiddlwareEnabled' => true,
142 |
143 | // Optional Roles Middleware
144 | 'rolesMiddlware' => 'role:admin',
145 |
146 | // Optional Role Model
147 | 'roleModel' => 'jeremykenedy\LaravelRoles\Models\Role',
148 |
149 | // Enable Soft Deletes - Not yet setup - on the roadmap.
150 | 'softDeletedEnabled' => false,
151 |
152 | // Laravel Default User Model
153 | 'defaultUserModel' => 'App\User',
154 |
155 | // Use the provided blade templates or extend to your own templates.
156 | 'showUsersBlade' => 'laravelusers::usersmanagement.show-users',
157 | 'createUserBlade' => 'laravelusers::usersmanagement.create-user',
158 | 'showIndividualUserBlade' => 'laravelusers::usersmanagement.show-user',
159 | 'editIndividualUserBlade' => 'laravelusers::usersmanagement.edit-user',
160 |
161 | // Use Package Bootstrap Flash Alerts
162 | 'enablePackageBootstapAlerts' => true,
163 |
164 | // Users List Pagination
165 | 'enablePagination' => true,
166 | 'paginateListSize' => 25,
167 |
168 | // Enable Search Users- Uses jQuery Ajax
169 | 'enableSearchUsers' => true,
170 |
171 | // Users List JS DataTables - not recommended use with pagination
172 | 'enabledDatatablesJs' => false,
173 | 'datatablesJsStartCount' => 25,
174 | 'datatablesCssCDN' => 'https://cdn.datatables.net/1.10.12/css/dataTables.bootstrap.min.css',
175 | 'datatablesJsCDN' => 'https://cdn.datatables.net/1.10.12/js/jquery.dataTables.min.js',
176 | 'datatablesJsPresetCDN' => 'https://cdn.datatables.net/1.10.12/js/dataTables.bootstrap.min.js',
177 |
178 | // Bootstrap Tooltips
179 | 'tooltipsEnabled' => true,
180 | 'enableBootstrapPopperJsCdn' => true,
181 | 'bootstrapPopperJsCdn' => 'https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js',
182 |
183 | // Icons
184 | 'fontAwesomeEnabled' => true,
185 | 'fontAwesomeCdn' => 'https://use.fontawesome.com/releases/v5.0.6/css/all.css',
186 |
187 | // Extended blade options for packages app.blade.php
188 | 'enableBootstrapCssCdn' => true,
189 | 'bootstrapCssCdn' => 'https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css',
190 |
191 | 'enableAppCss' => true,
192 | 'appCssPublicFile' => 'css/app.css',
193 |
194 | 'enableBootstrapJsCdn' => true,
195 | 'bootstrapJsCdn' => 'https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js',
196 |
197 | 'enableAppJs' => true,
198 | 'appJsPublicFile' => 'js/app.js',
199 |
200 | 'enablejQueryCdn' => true,
201 | 'jQueryCdn' => 'https://code.jquery.com/jquery-3.3.1.min.js',
202 | ```
203 |
204 | ### Routes
205 | * ```/users```
206 | * ```/users/{id}```
207 | * ```/users/create```
208 | * ```/users/{id}/edit```
209 |
210 | ###### Routes In-depth
211 | | Method | URI | Name | Action | Middleware |
212 | | :-------- | :--------------------- | :--------------- | :-------------------------------------------------------------------------------- | :---------- |
213 | | GET/HEAD | users | users | jeremykenedy\laravelusers\app\Http\Controllers\UsersManagementController@index | web,auth |
214 | | POST | users | users.store | jeremykenedy\laravelusers\app\Http\Controllers\UsersManagementController@store | web,auth |
215 | | GET/HEAD | users/create | users.create | jeremykenedy\laravelusers\app\Http\Controllers\UsersManagementController@create | web,auth |
216 | | GET/HEAD | users/{user} | users.show | jeremykenedy\laravelusers\app\Http\Controllers\UsersManagementController@show | web,auth |
217 | | DELETE | users/{user} | user.destroy | jeremykenedy\laravelusers\app\Http\Controllers\UsersManagementController@destroy | web,auth |
218 | | PUT/PATCH | users/{user} | users.update | jeremykenedy\laravelusers\app\Http\Controllers\UsersManagementController@update | web,auth |
219 | | GET/HEAD | users/{user}/edit | users.edit | jeremykenedy\laravelusers\app\Http\Controllers\UsersManagementController@edit | web,auth |
220 |
221 | ### Required Packages
222 | (included in this package)
223 |
224 | * [laravelcollective/html](https://packagist.org/packages/laravelcollective/html)
225 |
226 | ### Screenshots
227 |
228 | 
229 | 
230 | 
231 | 
232 | 
233 | 
234 | 
235 | 
236 | 
237 | 
238 |
239 | ### File Tree
240 |
241 | ```bash
242 | laravel-users/
243 | ├── .env.travis
244 | ├── .gitignore
245 | ├── .travis.yml
246 | ├── LICENSE
247 | ├── composer.json
248 | ├── phpunit.xml
249 | ├── readme.md
250 | └── src
251 | ├── App
252 | │ └── Http
253 | │ └── Controllers
254 | │ └── UsersManagementController.php
255 | ├── LaravelUsersFacade.php
256 | ├── LaravelUsersServiceProvider.php
257 | ├── config
258 | │ └── laravelusers.php
259 | ├── resources
260 | │ ├── lang
261 | │ │ └── en
262 | │ │ ├── app.php
263 | │ │ ├── forms.php
264 | │ │ ├── laravelusers.php
265 | │ │ └── modals.php
266 | │ └── views
267 | │ ├── layouts
268 | │ │ └── app.blade.php
269 | │ ├── modals
270 | │ │ ├── modal-delete.blade.php
271 | │ │ └── modal-save.blade.php
272 | │ ├── partials
273 | │ │ ├── bs-visibility-css.blade.php
274 | │ │ ├── form-status.blade.php
275 | │ │ ├── search-users-form.blade.php
276 | │ │ └── styles.blade.php
277 | │ ├── scripts
278 | │ │ ├── check-changed.blade.php
279 | │ │ ├── datatables.blade.php
280 | │ │ ├── delete-modal-script.blade.php
281 | │ │ ├── save-modal-script.blade.php
282 | │ │ ├── search-users.blade.php
283 | │ │ ├── toggleText.blade.php
284 | │ │ └── tooltips.blade.php
285 | │ └── usersmanagement
286 | │ ├── create-user.blade.php
287 | │ ├── edit-user.blade.php
288 | │ ├── show-user.blade.php
289 | │ └── show-users.blade.php
290 | └── routes
291 | └── web.php
292 |
293 |
294 | ```
295 |
296 | * Tree command can be installed using brew: `brew install tree`
297 | * File tree generated using command `tree -a -I '.git|node_modules|vendor|storage|tests'`
298 |
299 | ### Opening an Issue
300 | Before opening an issue there are a couple of considerations:
301 | * You are all awesome!
302 | * **Read the instructions** and make sure all steps were *followed correctly*.
303 | * **Check** that the issue is not *specific to your development environment* setup.
304 | * **Provide** *duplication steps*.
305 | * **Attempt to look into the issue**, and if you *have a solution, make a pull request*.
306 | * **Show that you have made an attempt** to *look into the issue*.
307 | * **Check** to see if the issue you are *reporting is a duplicate* of a previous reported issue.
308 | * **Following these instructions show me that you have tried.**
309 | * If you have a questions send me an email to jeremykenedy@gmail.com
310 | * Need some help, I can do my best on Slack: https://opensourcehelpgroup.slack.com
311 | * Please be considerate that this is an open source project that I provide to the community for FREE when opening an issue.
312 |
313 | ### License
314 | Laravel Users | A Laravel Users Management Package is open-sourced software licensed under the [MIT license](http://opensource.org/licenses/MIT). Enjoy!
315 |
--------------------------------------------------------------------------------
/src/resources/views/usersmanagement/edit-user.blade.php:
--------------------------------------------------------------------------------
1 | @extends(config('laravelusers.laravelUsersBladeExtended'))
2 |
3 | @section('template_title')
4 | {!! trans('laravelusers::laravelusers.editing-user', ['name' => $user->name]) !!}
5 | @endsection
6 |
7 | @section('template_linked_css')
8 | @if(config('laravelusers.enabledDatatablesJs'))
9 |
10 | @endif
11 | @if(config('laravelusers.fontAwesomeEnabled'))
12 |
13 | @endif
14 | @include('laravelusers::partials.styles')
15 | @include('laravelusers::partials.bs-visibility-css')
16 | @endsection
17 |
18 | @section('content')
19 |