Laravel Boilerplate with JWTAuth is a Laravel Framework for Restfull API include function Register, Authenticate, Activated Email, and Reset Password.
Use CMD or Terminal and clone this repo:
- Clone or Download This Repo:
$ git clone https://github.com/ranggadarmajati/Laravel-Boilerplate-with-JWT-Auth
- After Cloning this Repo, you must to install package depencies use composer on terminal
$ composer install
- Publish the Config JWT-Auth:
$ php artisan vendor:publish --provider="Tymon\JWTAuth\Providers\LaravelServiceProvider"
- Create Your Database on mysql or pgsql
- Create your Environment file, copy .env.example and edit the parts listed below, after that save as .env
ACTIVATIONS_URL="http://localhost:8000/api/v1/eks/activation/"
TITLE_EMAIL=verification
EMAIL_SUPPORT=support@apps.com
PROJECT_NAME=Apps
LOG_CHANNEL=stack
DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=your_database_name
DB_USERNAME=your_username_database
DB_PASSWORD=your_password_database
BROADCAST_DRIVER=log
CACHE_DRIVER=file
QUEUE_CONNECTION=sync
SESSION_DRIVER=file
SESSION_LIFETIME=120
REDIS_HOST=127.0.0.1
REDIS_PASSWORD=null
REDIS_PORT=6379
MAIL_DRIVER=smtp
MAIL_HOST=your_host_email_server_like_smtp.gmail.com
MAIL_PORT=your_mail_port
MAIL_USERNAME=your_mail_username
MAIL_PASSWORD=your_mail_password
MAIL_ENCRYPTION=tls
- Open your CMD or terminal for migrate Schema database and Seed your dummy data for role user:
$ php artisan migrate
$ php artisan db:seed
7.Check Routes
$ php artisan route:list
- if the route appears, run the application
$ php artisan serve
To try this application you can use API Tester such as Post Man or Insomnia
- Register
- Login / Authtenticate
- Reset Password
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Please make sure to update tests as appropriate.
MIT License
Copyright (c) 2019 Rangga Darmajati
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.