Laravel 5 already comes with a user model, if you transferred the User table to your database (set the database credentials in the .env file in the root of your project) using php artisan migrate , then it's just a matter of creating a user.
Migration files for the user model must also be included.
You can then create a user by creating a database seed, or simply do:
User::create( [ 'name' => 'you', 'email' => ' you@you.com ', 'password' => Hash::make('secret') ] );
Then you can log in using JWTAuth with credentials in an array of type
['email' => ' you@you.com ', 'password' => 'secret']
Depending on where you call User::create() , you may need to enable
use App\User;
at the top of your controller, where the App is your application namespace. App is the default namespace, but you can easily change it to whatever you want, it is completely optional, and you do not need to do this. Just add this if you changed it.
Edit: Perhaps this external tutorial on scotch.io can help you more in the long run.
source share