Laravel Users | A Laravel Users CRUD Management Package

Overview

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!

Comments
  • Preventing XSS

    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

    opened by terrorfall 9
  • How to render the blade file in the /resources/views/vendor/laravelusers/usersmanagement folder

    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!!

    opened by quocanh261997 9
  • I don't know how to install

    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.

    opened by measproem 9
  • Change extends class

    Change extends class

    First of all, thank you very much for this excelent package.

    So there is a simple problem in UsersManagementController extends from App\Http\Controllers\Controller

    The package is for use in Laravel Framework, but in this usage App\Http\Controllers\Controller is in level of Laravel Application.

    So if I had an other base class like this project https://github.com/guifabrin/finance_laravel on Controller is actually https://github.com/guifabrin/finance_laravel/blob/master/app/Base/ApplicationController.php we have a small issue on Controller class do not exists.

    But if we use Illuminate\Routing\Controller which is the BaseControllerof the App\Http\Controllers\Controller works fine in both cases.

    Thanks and I stay avaliable for any discussion.

    opened by guifabrin 8
  • How can I use spatie/laravel-permission?

    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.

    opened by bnymn 4
  • 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

    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)

    opened by mbelatar 4
  • Logout dropdown not showing

    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

    opened by float1 4
  • Invalid translations - html entities

    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?

    opened by xorock 4
  • Bug: System will not make use of published config

    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.

    invalid see opening an issue in readme 
    opened by hirsty 4
  • Sending data to create user blade view

    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?

    opened by terrorfall 3
  • Allow adding a custom middleware to all routes

    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.

    opened by pjotrsavitski 3
  • [#82] Allow most special characters in `name` of a user

    [#82] Allow most special characters in `name` of a user

    This addresses #82 in order to allow for non-alpha-numeric characters such as spaces, commas, periods, etc. in a user's name field while still keeping XSS checks.

    This uses not_regex validation to check that there are no < characters in the string nor & characters just to be safe from any HTML entity business.

    opened by sha1sum 0
  • Allow spaces in `name` validation for user

    Allow spaces in `name` validation for user

    It seems that a side effect of #65 was the inability to use spaces within names. Given that a user's full name is often what is used in this field (at least it is in all of our applications), this should probably be changed to use a regex as was noted in the conversation on #63. I am entering this issue for posterity, but will be forking and submitting a PR soon.

    opened by sha1sum 0
  • Add new columns to save on controller

    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.

    opened by Darkhyrax 0
  • route on show-users.blade.php

    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>
    
    opened by sunerandgarcia 0
  • Custom Users Model (not being honored?)

    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!

    bug 
    opened by RomanoCodes 7
Releases(v4.3.0)
Owner
Jeremy Kenedy
Love programming everyday. Practice compassion and kindness to all. Striving to be a better person and father. Love giving back and helping others.
Jeremy Kenedy
Laravel UI, Auth, & CRUD scaffolding package using Bootstrap & Livewire.

bastinald/ux Laravel UI, Auth, & CRUD scaffolding package using Bootstrap & Livewire. Features Automatic migrations Automatic routing Automatic passwo

null 33 Nov 26, 2022
rapyd: crud widgets for laravel. datatable, grids, forms, in a simple package

rapyd-laravel This is a pool of presentation and editing widgets (Grids and Forms) for laravel. Nothing to "generate", just some classes to let you de

Felice Ostuni 875 Dec 29, 2022
An open source Laravel Soundboard with Admin Panel CRUD (Create Read Update Delete) built on Laravel, Bootstrap, and Vue.js

Laravel Soundboard An open source Laravel Soundboard with Admin Panel CRUD (Create Read Update Delete) built on Laravel 5.8, Bootstrap 4, Vue.js, Boot

Jeremy Kenedy 24 Oct 28, 2022
Laravel Ajax Datatable is a nice laravel admin panel which includes authentication, CRUD and Ajax datatable.

Laravel Ajax Datatable is a nice laravel admin panel which includes authentication, CRUD and Ajax datatable. the datatable is created with laravel & ajax so No need to install another package, yout can do search, sort, paginate and show records per page fastly.

Jumah 3 Oct 3, 2022
Laravel User Activity Log - a package for Laravel 8.x that provides easy to use features to log the activities of the users of your Laravel app

Laravel User Activity Log - a package for Laravel 8.x that provides easy to use features to log the activities of the users of your Laravel app

null 9 Dec 14, 2022
Laravel Livewire UI, Auth, & CRUD starter kit.

Laravel Livewire Ui This package provides Laravel Livewire & Bootstrap UI, Auth, & CRUD scaffolding commands to make your development speeds blazing f

null 97 Nov 15, 2022
Laravel 8 + CoreUI + Livewire + Datatables (CRUD)

Laravel 8 + CoreUI + Livewire + Datatables About Laravel 8 + CoreUI + Livewire Datatables Whats Inside Laravel Core UI - (https://github.com/HZ-HBO-IC

Muhammad Rheza Alfin 38 Nov 3, 2022
CRUD COM LARAVEL 8, MVC, LOGIN E ROTAS, PRONTO PARA VOCE USAR NOS SEUS PROJETOS

CRUD COM LARAVEL 8, MVC, LOGIN E ROTAS, PRONTO PARA VOCE USAR NOS SEUS PROJETOS. Para rodar o Crud é preciso instalar o composer e um servidor localho

Isaias Oliveira 2 Nov 16, 2021
Laravel real-time CRUD using Google Firebase.

Laravel real-time CRUD using Google Firebase.

Fadi Mathlouthi 1 Oct 22, 2021
CRUD de sistema de empleados hecho en Laravel

About Laravel Laravel is a web application framework with expressive, elegant syntax. We believe development must be an enjoyable and creative experie

Vanesa Cardona 2 Nov 12, 2021
CRUD utilizando laravel, sendo um site para criação de eventos e festivais.

About Laravel Laravel is a web application framework with expressive, elegant syntax. We believe development must be an enjoyable and creative experie

Bruno 2 Oct 20, 2021
Laravel 8 + CoreUI + Livewire + Datatables (CRUD)

Laravel 8 + CoreUI + Livewire + Datatables About Laravel 8 + CoreUI + Livewire Datatables Whats Inside Laravel Core UI - (https://github.com/HZ-HBO-IC

Muhammad Rheza Alfin 38 Nov 3, 2022
Laravel generator with GUI. Generate crud / scaffold.

Laravel generator with GUI. Generate crud / scaffold.

George 420 Dec 5, 2022
Laravel-api - crud and login/signup apis

About Laravel Laravel is a web application framework with expressive, elegant syntax. We believe development must be an enjoyable and creative experie

Maaz Ali Khan 2 Jan 2, 2022
Simple CRUD + Search using Laravel 8 and Livewire 2

About Laravel Laravel is a web application framework with expressive, elegant syntax. We believe development must be an enjoyable and creative experie

PowPow 11 Sep 29, 2022
WIRECRUD 9 adalah aplikasi CRUD + Search sederhana yang dibuat menggukana Laravel 9 dan Livewire 2

WIRECRUD 9 adalah aplikasi CRUD + Search sederhana yang dibuat menggukana Laravel 9 dan Livewire 2. Demo bisa dilihat di YouTube Developow Terbuka jika ingin clone apliaksi sederhana ini untuk belajar, bisa ikuti cara-cara berikut ini.

DeveloPow 11 Nov 25, 2022
Proyecto Start-Basic sobre Login y crud de usuarios, mediante Api Rest, usando la plantilla AdminLte 3.1 y manejo de roles y permisos con spatie y autenticacion JWT

Proyecto Start-Basic sobre Login y crud de usuarios, mediante Api Rest, usando la plantilla AdminLte 3.1 y manejo de roles y permisos con spatie y autenticacion JWT

null 9 Jul 5, 2022
Laravel 5 Package to Detect Users Browsers, Devices, Languages and Operating Systems

laravel-identify Laravel 5 Package to identify a User's Browser, Operating System, Language and Device Installation PHP 7.1+ or HHVM 3.3+, and Compose

Prosper Otemuyiwa 183 Nov 30, 2022
Laravel package for giving admin-created accounts to users via 'set-password' email.

Invytr When making a website where users are created instead of registering themselves, you are faced with the challenge of safely giving users the ac

GlaivePro 64 Jul 17, 2022