- Laravel 5.6 Authentication package with
- Multi user type with roles (superadmin, admin, editor, user and featured user)
- User redirect to proper page (profile / admin dashboard)
- Registered user email confirmation using trait (Traits\AuthRedirect)
- User roles sync (include test views url /admin/test, /test/profile )
- Using Laravel Queue Jobs
- Customizable Markdown template for notifications (Confirm Email and Reset password)
- User soft delete (active/inactive)
- Auth roles editing method for testing at profile and dashboard
- All content, message and alerts are localized, languages files in two languages (English, Russian), to insert language switcher please visit my localization easy package adamibrahim/localization
- Demo account
- Username : admin@example.com
- Password : 123456
You can see working demo
- /login (user --not moderator-- login )
- /test/profile (user --not moderator-- profile )
- /admin/login (Moderator login)
- /admin/test (Moderator dashboard)
$ composer require adamibrahim/superauth
If you are installing at laravel 5.5 or higher then you may go directly to Publish other wise you will need to edit composer.json, register the Service Provider and the middleware
Add this code to your composer.json under the autoload at your main directory
"psr-4": {
"Adam\\Superauth\\": "vendor/adamibrahim/superauth/src"
}
At file config/app.php register service provider under * Package Service Providers...
Adam\Superauth\SuperauthServiceProvider::class,
if you are using Laravel version lower than 5.5 then you need to register the moderators and Visitor middleware at your App\Http\Kernel.php
- At protected $routeMiddleware = [ ] array add the below code
'moderators' => \Adam\Superauth\Middleware\Moderators::class,
'visitor' => \Adam\Superauth\Middleware\Visitor::class,
$ php artisan vendor:publish --tag=Superauth --force
run the Artisan migration command
$ php artisan migrate
Run the Artisan Seeding command
$ php artisan db:seed --class=Adam\Superauth\database\seeds\RolesTableSeeder
If you receive Class not found Error:
Then you may need to dump-autoload by running this command
$ composer dump-autoload
Then run the seeding command once again
$ php artisan db:seed --class=Adam\Superauth\database\seeds\RolesTableSeeder
I'm Using Queues to send emails (speed up the app) however if you don't wish to use it you can change at your .env file
QUEUE_DRIVER=sync
Please see CHANGELOG for more information on what has changed recently.
$ composer test
Please see CONTRIBUTING and CODE_OF_CONDUCT for details.
If you discover any security related issues, please email :author_email instead of using the issue tracker.
The MIT License (MIT). Please see License File for more information.