Skip to content

PatidarWeb/laravel-api

 
 

Repository files navigation

laravel-api

Laravel as API layer

Resonse Type

  • JSON
    • Currently suppoted
  • [] JSONP
  • [] HAL JSON
  • [] XML

Third party library

  • Adding package manger secrity using Roave Security Advisories
  • Adding coding standard from Zend Framework Coding Standard
  • Adding Role-based-access-control (RBAC)
  • Adding Log activity
  • Adding response header security using CORS headers
  • Adding log viewer
  • Adding Google Analytics package for retriving analytics data
  • Adding setting repository
  • Adding Laravel Flysystem for multipal backup on (AwsS3, Azure, Dropbox, GridFS, Rackspace, Sftp, WebDav, ZipAdapter)
  • Adding LERN (Laravel Exception Recorder and Notifier)
  • Adding redis library (Flexible and feature-complete Redis client for PHP and HHVM)
  • Adding faker for fake database generation
  • Adding Laravel Repositories Pattern
  • Adding laravel passport for tokenizer
  • Adding Laravel Cashier for maintain payment(s).
  • Adding laravel event broadcasting
  • Adding larvel debug bar for live debug log on view side.
  • Adding larvel telescope for the debugging purpose ( requests , exceptions, log entries, database queries, queued jobs, mail, notifications, cache operations, scheduled tasks, variable dumps and more )
  • Adding Laravel Socialite for social auth ( Facebook, Twitter, LinkedIn, Google, GitHub and Bitbucket. )

TODO

  • [] Custom template for the api response

Special thanks

Thanks to all of third party library provider.

API formate

JSON Response

Success template

{
    status: 1,
    message: "This is success message for client",
    errorCode:100
    data:"data can be array or array of object",
}

Error template

{
    status: 0,
    message: "This is error message for client",
    errorCode:301
    data:"data can be array or array of object",
}

status value must be either 0 or 1

message value must be array.

errorCode value must be integer.

data would be any kind of response

Reserved code for the respose format

errorCode has reserved value from 0 to 999.

0 to 99 for application use 100 to 599 used as HTTP status code 600 to 999 used for tcp/udp protocol

General Assemption

Project accept follwing headers

  • application/json
  • application/xml

About

Laravel as API layer

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • PHP 76.4%
  • Vue 13.5%
  • HTML 10.1%