taskforcedev / user
A laravel package providing routes, controller and views for user login/register, etc.
Requires
- php: >=5.5.0
- laravel/framework: 5.*
- taskforcedev/laravel-support: 1.*
This package is not auto-updated.
Last update: 2024-12-07 18:03:26 UTC
README
A package for Laravel 5 (4 branch also available) which provides routes, views and controllers for authentication including register, login, logout and home.
About
A Laravel package providing routes, controller and views for user login/register, etc.
The package follows convention over configuration, examples of this are using the User model that ships with laravel, it is assumed you will create your own migrations etc for this.
What this package provides is an out-of-the-box authentication system built on top of the Laravel model.
Routes:
get /login shows the login form.
get /register shows the registration form.
post /login logs the user in.
post /register registers the user (creates their account).
get /user the default page once the user is logged in.
get /logout logs the user out (takes them to the login page).
Installation
To install the package add the following line to your composer.json
"require": {
"taskforcedev/user": "5.*"
}
After doing this you should run composer update, then a dump autoload preferably using artisan
php artisan dump-autoload
Service Provider
After this you should add the following service provider to your config/app.php
Taskforcedev\User\ServiceProvider::class,
Also if not present please also add the following service provider.
Taskforcedev\LaravelSupport\ServiceProvider::class,
Overwriting Config
The package comes with default config however you will likely wish to publish this and overwrite with your own config settings.
php artisan vendor:publish --tag="user-config"
Common Problems
Illuminate \ Database \ Eloquent \ MassAssignmentException username
For this you need to add the following to your App/Models/User.php
protected $fillable = ['username', 'password'];