geoffselby / laravel-jwt-boilerplate
Rapidly build an API with Laravel and JWT authentication.
Installs: 21
Dependents: 0
Suggesters: 0
Security: 0
Stars: 19
Watchers: 3
Forks: 2
Open Issues: 20
Type:project
Requires
- php: ^7.1.3
- barryvdh/laravel-cors: ^0.11.3
- fideloper/proxy: ^4.0
- laravel/framework: ^6.0
- laravel/tinker: ^1.0
- tymon/jwt-auth: 1.0.*
Requires (Dev)
- beyondcode/laravel-dump-server: ^1.0
- filp/whoops: ^2.0
- fzaninotto/faker: ^1.4
- mockery/mockery: ^1.0
- nunomaduro/collision: ^3.0
- phpunit/phpunit: ^7.5
- dev-master
- v1.0.0
- v0.0.3
- v0.0.2
- v0.0.1
- dev-dependabot/npm_and_yarn/json5-1.0.2
- dev-dependabot/npm_and_yarn/express-4.18.2
- dev-dependabot/npm_and_yarn/decode-uri-component-0.2.2
- dev-dependabot/npm_and_yarn/eventsource-1.1.1
- dev-dependabot/npm_and_yarn/url-parse-1.5.10
- dev-dependabot/npm_and_yarn/ajv-6.12.6
- dev-dependabot/npm_and_yarn/tar-4.4.19
- dev-dependabot/npm_and_yarn/path-parse-1.0.7
- dev-dependabot/npm_and_yarn/dns-packet-1.3.4
- dev-dependabot/npm_and_yarn/browserslist-4.16.6
- dev-dependabot/npm_and_yarn/lodash-4.17.21
- dev-dependabot/composer/laravel/framework-6.20.26
- dev-dependabot/npm_and_yarn/ssri-6.0.2
- dev-dependabot/npm_and_yarn/elliptic-6.5.4
- dev-dependabot/npm_and_yarn/axios-0.21.1
- dev-dependabot/npm_and_yarn/ini-1.3.7
- dev-dependabot/npm_and_yarn/http-proxy-1.18.1
- dev-dependabot/npm_and_yarn/websocket-extensions-0.1.4
- dev-dependabot/npm_and_yarn/jquery-3.5.0
- dev-dependabot/npm_and_yarn/acorn-6.4.1
This package is auto-updated.
Last update: 2025-03-04 10:11:51 UTC
README
This boilerplate is meant to be used to rapidly build an API with Laravel using JWT authentication.
Features inlude:
- Full authentication suite with JWT-Auth - tymondesigns/jwt-auth
- CORS handling with Laravel-CORS - barryvdh/laravel-cors
- Email verification handling done for you 🙌
Installation
First, run composer create-project geoffselby/laravel-jwt-boilerplate
Then, have a 🍺 and wait for composer to do it's thing.
Once you have installed the boilerplate with Composer, set up your database in .env
and run the php artisan migrate
command to migrate the database. The JWT secret is generated automatically when you install the boilerplate with Composer.
Usage
API Development
Develop your API the same way you would normally develop a Laravel powered API with JWT authentication implemented out of the box.
Frontend Implementation
This boilerplate is designed so that you can use whatever frontend implementation you choose (i.e. Create React App or Vue CLI) as long as you implement authentication correctly.
Create React App example: Coming Soon
Enabling CORS
By default, CORS is enabled for all routes since it is assumed you are using a seperate front end.
Check the Laravel-CORS docs for more info.
Contributing
If you would like to contribute to this project, submit a PR for review. A more detailed contribution guide is in the works.
License
This project is open-sourced software licensed under the MIT license.