Package Data | |
---|---|
Maintainer Username: | intothesource |
Maintainer Contact: | gjroke@intothesource.com (Gertjan Roke) |
Package Create Date: | 2015-09-29 |
Package Last Update: | 2019-11-06 |
Language: | PHP |
License: | BSD-2 |
Last Refreshed: | 2025-01-26 15:00:10 |
Package Statistics | |
---|---|
Total Downloads: | 775 |
Monthly Downloads: | 0 |
Daily Downloads: | 0 |
Total Stars: | 0 |
Total Watchers: | 5 |
Total Forks: | 2 |
Total Open Issues: | 0 |
User manager with roles (single and multiple)
composer require intothesource/users
This package also uses the Entrance package, for more information about that package go to that repositorie.
Add the following line to "config/app.php"
at "providers":
IntoTheSource\Users\UsersServiceProvider::class,
Collective\Html\HtmlServiceProvider::class,
And at "aliases":
'Form' => Collective\Html\FormFacade::class,
'Html' => Collective\Html\HtmlFacade::class,
Run the following command:
php artisan vendor:publish
Run the command:
php artisan migrate
Add the following lines to the '$routeMiddleware' array in the file 'App/Http/Kernel.php'
'sourceOrAdmin' => \IntoTheSource\Users\Http\Middleware\IfSourceOrAdmin::class,
If you go to the user index you first need a role that sign in the config file at 'Middleware'
If you want to at basic roles, do the following thinks. @note: if you want to use this be sure that you also included the database seeding of the Entrance package
Add to your 'DatabaseSeeder.php' file in the 'database/seeds' folder
$this->call(RoleTableSeeder::class);
$this->call(RoleUserTableSeeder::class);
After that run the next command:
php artisan db:seed
####### Or if you don't want to do that run the following commands:
first: php artisan db:seed --class=RoleTableSeeder
second: php artisan db:seed --class=RoleUserTableSeeder