Coder Social home page Coder Social logo

jeremykenedy / laravel-users Goto Github PK

View Code? Open in Web Editor NEW
408.0 26.0 113.0 199 KB

A Users Management Package that includes all necessary routes, views, models, and controllers for a user management dashboard and associated pages for managing Laravels built in user scaffolding. Built for Laravel 5.2, 5.3, 5.4, 5.5, 5.6, 5.7, 5.8, 6.0, 7.0 and 8.0.

License: MIT License

PHP 46.93% Blade 53.07%
laravel-users users users-management manage-users register-users manage-laravel-users laravel-user-management

laravel-users's Introduction

Laravel Users

Laravel Users | A Laravel Users CRUD Management Package

A Users Management CRUD Package that includes all necessary routes, views, models, and controllers for a user management dashboard and associated pages for managing Laravels built in user scaffolding. Easily start creating, updating, editing, and deleting users in minutes with minimal setup required; Easily search all users, helpful for large user bases.

Latest Stable Version Total Downloads Travis-CI Build StyleCI Scrutinizer Code Quality License: MIT Become a Patreon

Table of contents

Features

Laravel Users Features
Full CRUD of Laravel Users
Works with built in auth scaffolding
Works with various Roles/ACL Packages
Uses Language localization File System
Uses font awesome, cdn can be optionally called in config
Can use built in pagination and/or datatables.js
Can search all users by name, id, or email
Lots of configuration options

Requirements

Integrations

Laravel users can work out the box with or without the following roles packages:

Installation Instructions

  1. From your projects root folder in terminal run:

    Laravel 5.6, 5.7, 5.8, 6, 7, and 8+ use:

        composer require jeremykenedy/laravel-users
    

    Laravel 5.5 use:

        composer require jeremykenedy/laravel-users:2.0.2
    

    Laravel 5.4 use:

        composer require jeremykenedy/laravel-users:1.4.0
    

    Laravel 5.3 use:

        composer require jeremykenedy/laravel-users:1.3.0
    

    Laravel 5.2 use:

        composer require jeremykenedy/laravel-users:1.2.0
    
  2. Register Package

  • Laravel 5.5, 5.6, 5.7, 5.8, 6, 7, 8+ Uses package auto discovery feature, no need to edit the config/app.php file.

  • Laravel 5.4 and below Register the package with laravel in config/app.php under providers with the following:

       Collective\Html\HtmlServiceProvider::class,
       jeremykenedy\laravelusers\LaravelUsersServiceProvider::class,
    
  1. Register the dependencies aliases
  • Laravel 5.5 and up Uses package auto discovery feature, no need to edit the config/app.php file.

  • Laravel 5.4 and below In config/app.php section under aliases with the following:

        'Form' => Collective\Html\FormFacade::class,
        'Html' => Collective\Html\HtmlFacade::class,
    
  1. Publish the package config and language files by running the following from your projects root folder:

        php artisan vendor:publish --tag=laravelusers
    

Configuration

Laravel Users can be configured directly in /config/laravelusers.php once you publish the assets.

    /*
    |--------------------------------------------------------------------------
    | Laravel-users setting
    |--------------------------------------------------------------------------
    */

    // The parent blade file
    'laravelUsersBladeExtended'     => 'laravelusers::layouts.app', // 'layouts.app'

    // Enable `auth` middleware
    'authEnabled'                   => true,

    // Enable Optional Roles Middleware on the users assignments
    'rolesEnabled'                  => false,

    /*
     | Enable Roles Middlware on the usability of this package.
     | This requires the middleware from the roles package to be registered in `App\Http\Kernel.php`
     | An Example: of roles middleware entry in protected `$routeMiddleware` array would be:
     | 'role' => \jeremykenedy\LaravelRoles\Middleware\VerifyRole::class,
     */

    'rolesMiddlwareEnabled'         => true,

    // Optional Roles Middleware
    'rolesMiddlware'                => 'role:admin',

    // Optional Role Model
    'roleModel'                     => 'jeremykenedy\LaravelRoles\Models\Role',

    // Enable Soft Deletes - Not yet setup - on the roadmap.
    'softDeletedEnabled'            => false,

    // Laravel Default User Model
    'defaultUserModel'              => 'App\User',

    // Use the provided blade templates or extend to your own templates.
    'showUsersBlade'                => 'laravelusers::usersmanagement.show-users',
    'createUserBlade'               => 'laravelusers::usersmanagement.create-user',
    'showIndividualUserBlade'       => 'laravelusers::usersmanagement.show-user',
    'editIndividualUserBlade'       => 'laravelusers::usersmanagement.edit-user',

    // Use Package Bootstrap Flash Alerts
    'enablePackageBootstapAlerts'   => true,

    // Users List Pagination
    'enablePagination'              => true,
    'paginateListSize'              => 25,

    // Enable Search Users- Uses jQuery Ajax
    'enableSearchUsers'             => true,

    // Users List JS DataTables - not recommended use with pagination
    'enabledDatatablesJs'           => false,
    'datatablesJsStartCount'        => 25,
    'datatablesCssCDN'              => 'https://cdn.datatables.net/1.10.12/css/dataTables.bootstrap.min.css',
    'datatablesJsCDN'               => 'https://cdn.datatables.net/1.10.12/js/jquery.dataTables.min.js',
    'datatablesJsPresetCDN'         => 'https://cdn.datatables.net/1.10.12/js/dataTables.bootstrap.min.js',

    // Bootstrap Tooltips
    'tooltipsEnabled'               => true,
    'enableBootstrapPopperJsCdn'    => true,
    'bootstrapPopperJsCdn'          => 'https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js',

    // Icons
    'fontAwesomeEnabled'            => true,
    'fontAwesomeCdn'                => 'https://use.fontawesome.com/releases/v5.0.6/css/all.css',

    // Extended blade options for packages app.blade.php
    'enableBootstrapCssCdn'         => true,
    'bootstrapCssCdn'               => 'https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css',

    'enableAppCss'                  => true,
    'appCssPublicFile'              => 'css/app.css',

    'enableBootstrapJsCdn'          => true,
    'bootstrapJsCdn'                => 'https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js',

    'enableAppJs'                   => true,
    'appJsPublicFile'               => 'js/app.js',

    'enablejQueryCdn'               => true,
    'jQueryCdn'                     => 'https://code.jquery.com/jquery-3.3.1.min.js',

Routes

  • /users
  • /users/{id}
  • /users/create
  • /users/{id}/edit
Routes In-depth
Method URI Name Action Middleware
GET/HEAD users users jeremykenedy\laravelusers\app\Http\Controllers\UsersManagementController@index web,auth
POST users users.store jeremykenedy\laravelusers\app\Http\Controllers\UsersManagementController@store web,auth
GET/HEAD users/create users.create jeremykenedy\laravelusers\app\Http\Controllers\UsersManagementController@create web,auth
GET/HEAD users/{user} users.show jeremykenedy\laravelusers\app\Http\Controllers\UsersManagementController@show web,auth
DELETE users/{user} user.destroy jeremykenedy\laravelusers\app\Http\Controllers\UsersManagementController@destroy web,auth
PUT/PATCH users/{user} users.update jeremykenedy\laravelusers\app\Http\Controllers\UsersManagementController@update web,auth
GET/HEAD users/{user}/edit users.edit jeremykenedy\laravelusers\app\Http\Controllers\UsersManagementController@edit web,auth

Required Packages

(included in this package)

Screenshots

Show Users Show User Edit User Edit User Password Create User Create User Modal Delete User Modal Error Create Error Update Error Delete

File Tree

laravel-users/
├── .env.travis
├── .gitignore
├── .travis.yml
├── LICENSE
├── composer.json
├── phpunit.xml
├── readme.md
└── src
    ├── App
    │   └── Http
    │       └── Controllers
    │           └── UsersManagementController.php
    ├── LaravelUsersFacade.php
    ├── LaravelUsersServiceProvider.php
    ├── config
    │   └── laravelusers.php
    ├── resources
    │   ├── lang
    │   │   └── en
    │   │       ├── app.php
    │   │       ├── forms.php
    │   │       ├── laravelusers.php
    │   │       └── modals.php
    │   └── views
    │       ├── layouts
    │       │   └── app.blade.php
    │       ├── modals
    │       │   ├── modal-delete.blade.php
    │       │   └── modal-save.blade.php
    │       ├── partials
    │       │   ├── bs-visibility-css.blade.php
    │       │   ├── form-status.blade.php
    │       │   ├── search-users-form.blade.php
    │       │   └── styles.blade.php
    │       ├── scripts
    │       │   ├── check-changed.blade.php
    │       │   ├── datatables.blade.php
    │       │   ├── delete-modal-script.blade.php
    │       │   ├── save-modal-script.blade.php
    │       │   ├── search-users.blade.php
    │       │   ├── toggleText.blade.php
    │       │   └── tooltips.blade.php
    │       └── usersmanagement
    │           ├── create-user.blade.php
    │           ├── edit-user.blade.php
    │           ├── show-user.blade.php
    │           └── show-users.blade.php
    └── routes
        └── web.php

  • Tree command can be installed using brew: brew install tree
  • File tree generated using command tree -a -I '.git|node_modules|vendor|storage|tests'

Opening an Issue

Before opening an issue there are a couple of considerations:

  • You are all awesome!
  • Read the instructions and make sure all steps were followed correctly.
  • Check that the issue is not specific to your development environment setup.
  • Provide duplication steps.
  • Attempt to look into the issue, and if you have a solution, make a pull request.
  • Show that you have made an attempt to look into the issue.
  • Check to see if the issue you are reporting is a duplicate of a previous reported issue.
  • Following these instructions show me that you have tried.
  • If you have a questions send me an email to [email protected]
  • Need some help, I can do my best on Slack: https://opensourcehelpgroup.slack.com
  • Please be considerate that this is an open source project that I provide to the community for FREE when opening an issue.

License

Laravel Users | A Laravel Users Management Package is open-sourced software licensed under the MIT license. Enjoy!

laravel-users's People

Contributors

ademayo avatar aofathy avatar bomoko avatar guifabrin avatar jeremykenedy avatar joostdebruijn avatar martijnr17 avatar ralphvk avatar sanderkruger avatar sascha-schieferdecker avatar scrutinizer-auto-fixer avatar swimlappy avatar terrorfall avatar vmitchell85 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

laravel-users's Issues

Custom Users Model (not being honored?)

I am using a user model with a custom table named defined:
image

However when doing something like adding a new user, an error is thrown. The error seems to be spitting back the '.users' table which makes me think some kind of default is not being overridden. Is this the case? How can I fix this (while keeping my custom user table)?

Thanks!

Select multiple roles

I use your roles and users package for a lot of laravel website I manage and am missing the multiple roles editor in the users section.
I have some really small changes in your code that enables this to work correctly.
Is it possible to implement this? You only have to change 4 lines of code, see below.

UsersManagementController.php
Line 159 $currentRole = ''; -> $currentRole = [];
Line 165 $currentRole = $user_role; -> $currentRole[] = $user_role->id;

edit-user.blade.php
Line 107 ->
Line 112 <option value="{{ $role->id }}" {{ $currentRole->id == $role->id ? 'selected="selected"' : '' }}>{{ $role->name }} -> <option value="{{ $role->id }}" {{ in_array($role->id ,$currentRole) ? 'selected="selected"' : '' }}>{{ $role->name }}

Issue 25 not fixed

Hello. I've recently installl this addon and I'm getting the same bug, so default templates remains activated.

// Use the provided blade templates or extend to your own templates.
    //'showUsersBlade'                => 'laravelusers::usersmanagement.show-users',
    'showUsersBlade'                => 'users.index',

Method [throwValidationException] does not exist

Hello,

I'm using the latest version of this package and Laravel 5.5.32. I'm getting this error when trying to validate creating a new user or editing an existing user.

Method [throwValidationException] does not exist on [jeremykenedy\laravelusers\App\Http\Controllers\UsersManagementController]

This is an excellent and very useful package. It is quite common to need some type of user management. Thanks for the work on this.

Jay

Support multiple roles per user in views

It is a common requirement to select multiple roles per user.

This package already supports a many-to-many relationship schema between Users and Roles via the role_user table. However, the Create and Edit pages currently allow for only the selection of one role per user.

No Controllers or Models file

Hi, I install the package and couldn't find the Controllers or Routes as stated from the README. Can anybody help me navigate through this? Thank you very much!!!

Bug: System will not make use of published config

Steps to Reproduce

  1. Follow Installation instructions to install into an existing Laravel Project
  2. Edit the published config to point main template to one that exists in your layouts folder (for this, i simply remove the "laravevelusers::" as I had an app.blade.php)
  3. Npm run dev and clear view cache just in case

Expected Result

Your template to change to my template

Actual Result

Defaults to your own template, although our template is working fine everywhere else.

Filter User Index

I adding a custom field to the users table and would like to be able to filter the filter the results based on the user viewing the list. I dont see anywhere in the code. Is it possible within the index method? Seems pagination is pretty much the only configurable option.

How to integrate this package in GUI

Hi,

I have installed this package but it showing a different UI or layout. Could you please let me know how to integrate into my existing layout. Thanks!

Logout dropdown not showing

Hello,
can you help me with this problem, in defalut Laravel app.blade.php Logout shows but when i go to /users then laravel-users app.blade.php loads and there from I can't get Logout to show.
Laravel version is latest i gues installer and created project with composer.

If it is stupid question just delete it. Thank you.

Edit: it has something to do with enableAppJs => false, but i don't understand if this is ok to do

login with admin

Swift_RfcComplianceException
Address in mailbox given [] does not comply with RFC 2822, 3.6.2.

Do you know how I can solve it?
thnx.

Sending data to create user blade view

I've recently switched over to this package and am migrating the user registration over. I am attempting to send database data from the Registration controller to the view. My RegisterController has the following line:

return view('auth.register')->with('accounts', $accounts);

I can see that this logic is contained in

jeremykenedy\laravelusers\app\Http\Controllers\UsersManagementController@create

under this function:

    public function create()
    {
        $roles = [];

        if ($this->_rolesEnabled) {
            $roles = config('laravelusers.roleModel')::all();
        }

        $data = [
            'rolesEnabled'  => $this->_rolesEnabled,
            'roles'         => $roles,
        ];

        return view(config('laravelusers.createUserBlade'))->with($data);
    }

Is there any way to migrate this logic into the CRUD routes that have setup by this package? Or extend the logic contained in the existing function?

Attempting to get working with laratrust

Hi,

I'm trying to get this working on fresh laravel 5.6 install with https://github.com/santigarcor/laratrust

I've run:
php artisan make:auth

composer require "santigarcor/laratrust:5.0.*"

php artisan vendor:publish --tag="laratrust"

php artisan laratrust:setup

composer require jeremykenedy/laravel-users

php artisan vendor:publish --tag=laravelusers

Copied Directory [\vendor\jeremykenedy\laravel-users\src\resources\views] To [\resources\views\vendor\laravelusers]
Copied Directory [\vendor\jeremykenedy\laravel-users\src\resources\lang] To [\resources\lang\vendor\laravelusers]
Publishing complete.

This has resulted in files being created e.g. resources\views\vendor\laravelusers\usersmanagement

php artisan migrate


contents of routes/web.php

Route::get('/', function () {
return view('welcome');
});

Auth::routes();

Route::get('/home', 'HomeController@index')->name('home');

If you can point out where I've gone wrong that would be great.

No error messages

Using argon2id for password hashing

I configured argon2id hasing in config/hashing.php as explained in the documentation of Laravel itself. However, when I create users via this module users get a bcrypt hashed password.

In the UsersManagementController I see that the bcrypt-function is used. Maybe this could be replaced with Hash::make() which respects the hashing configuration? If that is okay, I can purpose a pull request for it.

Argument 3 passed to NetoJose\Bootstrap4Forms\FormService::text() must be of the type string or null, array given, RROR) Argument 3 passed to NetoJose\Bootstrap4Forms\FormService::text() must be of the type string or null, array given, vendor\laravel\framework\src\Illuminate\Support\Facades\Facade.php

ErrorException (E_ERROR)
Argument 3 passed to NetoJose\Bootstrap4Forms\FormService::text() must be of the type string or null, array given, called in C:\server\www\projects\new\vendor\laravel\framework\src\Illuminate\Support\Facades\Facade.php on line 223 (View: C:\server\www\projects\new\vendor\jeremykenedy\laravel-users\src\resources\views\usersmanagement\create-user.blade.php)
Previous exceptions
Argument 3 passed to NetoJose\Bootstrap4Forms\FormService::text() must be of the type string or null, array given, called in C:\server\www\projects\new\vendor\laravel\framework\src\Illuminate\Support\Facades\Facade.php on line 223 (0)

Dutch Translation

Hi, I translated your language files to dutch. Can you give me permissions to push a branch so I can create a pull request? Or would you like to receive them some other way?

Invalid translations - html entities

Hello.
I did clean install of LV 5.6 + this package. Unfortunately all icons are displayed as html entities not as parsed HTML which is default behaviour of blade templates. Could You fix it?

Config file

Awesome work with this package and also the roles package.
Am slightly confused re Users....
When running the vendor publish command this does not push config.
Do I need to copy this manually into config directory? Roles seemed to do it automatically.
Just getting use to laravel n will definitely contribute to getting users & roles packages working together via GUI as I've seen a few pull requests already.

not install laravel 5.2.*

`composer require jeremykenedy/laravel-users
Using version ^1.0 for jeremykenedy/laravel-users
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.

Problem 1
- Conclusion: remove laravel/framework v5.2.45
- Conclusion: don't install laravel/framework v5.2.45
- jeremykenedy/laravel-users v1.0.0 requires laravelcollective/html ^5.3.0 -> satisfiable by laravelcollective/html[v5.3.0, v5.3.1, v5.4, v5.4.1, v5.4.2, v5.4.3, v5.4.4, v5.4.5, v5.4.6].
- jeremykenedy/laravel-users v1.0.1 requires laravelcollective/html ^5.3.0 -> satisfiable by laravelcollective/html[v5.3.0, v5.3.1, v5.4, v5.4.1, v5.4.2, v5.4.3, v5.4.4, v5.4.5, v5.4.6].
- laravelcollective/html v5.3.0 requires illuminate/view 5.3.* -> satisfiable by illuminate/view[v5.3.0, v5.3.16, v5.3.23, v5.3.4].
- laravelcollective/html v5.3.1 requires illuminate/view 5.3.* -> satisfiable by illuminate/view[v5.3.0, v5.3.16, v5.3.23, v5.3.4].
- laravelcollective/html v5.4 requires illuminate/view 5.4.* -> satisfiable by illuminate/view[v5.4.0, v5.4.13, v5.4.17, v5.4.19, v5.4.9].
- laravelcollective/html v5.4.1 requires illuminate/view 5.4.* -> satisfiable by illuminate/view[v5.4.0, v5.4.13, v5.4.17, v5.4.19, v5.4.9].
- laravelcollective/html v5.4.2 requires illuminate/view 5.4.* -> satisfiable by illuminate/view[v5.4.0, v5.4.13, v5.4.17, v5.4.19, v5.4.9].
- laravelcollective/html v5.4.3 requires illuminate/view 5.4.* -> satisfiable by illuminate/view[v5.4.0, v5.4.13, v5.4.17, v5.4.19, v5.4.9].
- laravelcollective/html v5.4.4 requires illuminate/view 5.4.* -> satisfiable by illuminate/view[v5.4.0, v5.4.13, v5.4.17, v5.4.19, v5.4.9].
- laravelcollective/html v5.4.5 requires illuminate/view 5.4.* -> satisfiable by illuminate/view[v5.4.0, v5.4.13, v5.4.17, v5.4.19, v5.4.9].
- laravelcollective/html v5.4.6 requires illuminate/view 5.4.* -> satisfiable by illuminate/view[v5.4.0, v5.4.13, v5.4.17, v5.4.19, v5.4.9].
- don't install illuminate/view v5.3.0|don't install laravel/framework v5.2.45
- don't install illuminate/view v5.3.16|don't install laravel/framework v5.2.45
- don't install illuminate/view v5.3.23|don't install laravel/framework v5.2.45
- don't install illuminate/view v5.3.4|don't install laravel/framework v5.2.45
- don't install illuminate/view v5.4.0|don't install laravel/framework v5.2.45
- don't install illuminate/view v5.4.13|don't install laravel/framework v5.2.45
- don't install illuminate/view v5.4.17|don't install laravel/framework v5.2.45
- don't install illuminate/view v5.4.19|don't install laravel/framework v5.2.45
- don't install illuminate/view v5.4.9|don't install laravel/framework v5.2.45
- Installation request for laravel/framework (locked at v5.2.45, required as 5.2.*) -> satisfiable by laravel/framework[v5.2.45].
- Installation request for jeremykenedy/laravel-users ^1.0 -> satisfiable by jeremykenedy/laravel-users[v1.0.0, v1.0.1].

Installation failed, reverting ./composer.json to its original content.`

I don't know how to install

Hi,

I followed : composer require jeremykenedy/laravel-users via CMD on window then got download "vendor" folder I don't know how to do next.

Soft delete on users

Is there a date in mind to implement soft deletes on the user model? I see it's on the road map from the config file.

I'm currently setting the trait on my User model, so that does at least give an interim solution, but it'd be great to have this built into the interface.

Allow adding a custom middleware to all routes

Would it be possible to add a custom middleware to protect the routes?

The solution might be needed to protect the user related routes in case one does not install the roles and permissions module. There is case where it is not needed and admin is determined based on the users table itself. No other roles are really needed.

The perfect scenario would be to just add the a configuration or even two and to trigger it within __constuct() method of the controller. It could be similar to how roles middleware is checked and triggered, just that it would allow one to configure any middleware to be enforced.

There did not seem to be a convenient way to make changes to an already defined routes.

route on show-users.blade.php

should change the route from fixed path to this

<a href="{{ route('users.edit', $user->id) }}" class="btn btn-block btn-md btn-warning">
                                    {!! trans('laravelusers::laravelusers.buttons.edit-user') !!}
                                </a>

Support Laravel 10 and remove abandoned dependency

Can this package get updated to support Laravel 10 and remove the laravecollective/html dependency because it's abandoned?
The replace package is spatie/laravel-html.

Issue:
jeremykenedy/laravel-users v4.3.0 requires laravelcollective/html (^5.4|^5.5|^5.6|^5.7|^5.8|^6.0|^7.0|^8.0)
Package laravelcollective/html is abandoned, you should avoid using it. Use spatie/laravel-html instead.

Preventing XSS

Not sure if I'm missing something obvious here, but how do I prevent XSS?

I've been able to insert a script alert function into the database and I can't see anywhere to add the validator to prevent this.

Line 32 on src/resources/views/usersmanagement/show-user.blade.php

{!! trans('laravelusers::laravelusers.showing-user-title', ['name' => $user->name]) !!}

This should be {{ }} instead of {!! to prevent raw output

Thanks

How to render the blade file in the /resources/views/vendor/laravelusers/usersmanagement folder

Hi, somehow, when I try to render these blade files, it's saying that a variable that's called "rolesEnabled" not defined, and so returning errors. Is there documentation somewhere saying:

  1. What are the necessary fields needed to render these fields
  2. What values and from what sources are we getting those values for those above fields to render the blade file

Thank you very much!!

Edit URL assumed as base_url

This line on show-user.blade.php

<a href="/users/{{$user->id}}/edit" class="btn btn-block btn-md btn-warning">

Assumes that the Laravel app is not served from a subfolder and should be changed to

<a href="{{ url('/') }}/users/{{$user->id}}/edit" class="btn btn-block btn-md btn-warning">

How can I use spatie/laravel-permission?

Hello there,

I have read the following statement in your README file.

Laravel users can work out the box with or without the following roles packages:

I don't think it is true. I have installed spatie/laravel-permission package, but it does not seem to be working with your package.

For example, I tried to change user permission, but I got an exception saying that detachAllRoles() does not exist in User class.

RoleDeniedException

How do I redirect someone from the admin if they don't have the role "admin" so that they don't see the ugly error? Is there any setting I could modify?

I'm using laravel roles btw.

Adding role and permission management

I'm using this package along with laravel-roles and i'd like to be able to manage both users and roles/permissions from this website. Is it already possible or has anyone else integrated it with role/permission management?

laravelcollective/html is abandoned, laravellux/html looks like a replacement candidate

From LaravelCollective website:

Given this pattern, I think it's best to retire these packages rather than potentially open unsuspecting applications to a potential attack.

The author suggests spatie/laravel-html, but that would be a huge effort as the code patterns are way too different from the former.

A bit before the above quote the author says:

Anyone can freely take it and begin their own journey, it will be a journey that belongs to them.

Well, it looks this is done now:

⚠️ Important Update: The laravellux/html package has replaced the laravelcollective/html package. Please replace all references of Collective\Html in your project with LaravelLux\Html. For the majority of applications, no other changes should be necessary, and your project should continue to work as expected. However, always ensure to thoroughly test your project after this update to avoid unexpected issues. Thank you for your understanding.

I haven't tested it, but it looks like a pretty straightforward, drop-in replacement. So I kindly ask you to replace the now abandoned laravelcollective/html in favor of laravellux/html.

Not installing fully

I have just started a new Laravel project and want to use laravel-users for user management. However on an install (PHP 7.1, Laravel 5.7 and the current version of this code) both I and a colleague, separately, are getting the error "Route [login] not defined." when browsing to /users. Looking at the result of the install it seems that neither providers nor aliases have been updated, and the migrations did not seem to run, despite package discovery locating correctly and no faults displayed in the console. Any ideas would be appreciated, thank you.

Add new columns to save on controller

Hello there, is there a way to overwrite or clone the usermanagementcontroller into the root project without modify on vendor folder?

I need add some columns and if i change the controller they doesnt upload on the github repository.

Hope you can help me.

Greetings.

Change max password length

How can i change the maximum password length?
A length of 20 characters is not really practical anymore, i think…

Thank you for your great package. 😃

Add sorting feature

I have tried to sort the user list through LengthAwarePaginator but it doesn't work

   $data = [
            'users'             => $users->setCollection(
                collect(
                    collect($users->items())->sortBy('email')
                )->values()
            ),
            'pagintaionEnabled' => $pagintaionEnabled
        ];

extending the edit form

As I was extending the form for user editing, I got that due to a missing validation here:

"Method [throwValidationException] does not exist on [jeremykenedy\laravelusers\App\Http\Controllers\UsersManagementController]."

which leads to public function store(Request $request)

is there a nice way of extending your form without messing around with the vendor package?

2FA supports?

Hi,

Does it support 2FA auth? (google authenticator, ...)

Thank you.

appJsPublicFile value suggestion for Laravel 9 \ Vite

This appears to be working with Laravel 9, but do you have any suggestions what that value should for appjsPublicFile and appcssPublicFile since we should be using Laravel Vite instead of Laravel Mix going forward?

My CSS and JS files are bundled here now:

/public/build/assets/app-238453fd.css
/public/build/assets/app-d35ea772.js

    'enableAppCss'                  => true,
    'appCssPublicFile'              => 'css/app.css',

    'enableBootstrapJsCdn'          => true,
    'bootstrapJsCdn'                => 'https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js',

    'enableAppJs'                   => true,
    'appJsPublicFile'               => 'js/app.js',

Also, composer says this dependency laravelcollective/html is abandoned and should avoid using it. They suggest using spatie/laravel-html instead.

Can this be updated too?

Customize UsersManagementController.php?

Whats the proper way to customize the User Management Controller without editing it within the vendor directory? Since it has hardcoded user fields, I would think it would almost always need to be customized, but during registration/publishing, it doesnt seem to be copied to the projects directories like the config and resources files are.

Enable datatables

Via config I enable datatables but nothing change, this :
'enabledDatatablesJs' => true,

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.