neoson/laravel-api-min-boilerplate

This package is not installable via Composer 1.x, please make sure you upgrade to Composer 2+. Read more about our Composer 1.x deprecation policy.

A simple laravel api boilerplate

1.0 2018-11-08 01:14 UTC

This package is auto-updated.

Last update: 2021-12-01 00:19:35 UTC


README

A simple laravel 5.7 api boilerplate which include very basic function to get started.

Features

  • Api token generator (email verfication, password recovery)
  • clockwork debug
  • laravel auditing
  • error logging to db
  • jwt authentication
  • laravel ide helper

Installation

run the following command from terminal

composer create-project --prefer-dist neoson/laravel-api-min-boilerplate myProject

run migration

php artisan migrate

generate jwt secret

php artisan jwt:generate

rename .env.example to .env and setup your configuration

run the application

php artisan serve

Usage

Important Diretories

api route : route/api.php
controller: app/Http/Controllers/V1
model : app/Model

This boilerplate provide function to send email

//run this queue worker
php artisan queue:work

//email template directories
resources/views/emails

Api

POST api/auth/register        //register an account and send verification email
POST api/auth/login           //perform login and get jwt token
GET  api/auth/email/verify    //verify email for new account
POST api/auth/recovery        //send a recovery email
GET  api/auth/reset           //reset password after verify recovery email
POST api/auth/refresh         //refresh the jwt token

//the following api require jwt token
//you can include in header(Authorization: Bearer 'token') 
//or as request parameters(token)
POST api/auth/password/change //for changing password
POST api/auth/logout          //logout
POST api/auth/me              //get current authencated user

Built With

License

This project is licensed under the MIT License - LICENSE

Feedback

Your feedback and contribution are very welcome, hope you enjoy it.