laravel-webservice-example-boilerplate

Laravel Webservice Example/Boilerplate using laravel7.x and sanctum - Clone and add your own custom functionalities

Stars
1
Committers
1

Laravel Webservice Example/Boilerplate

Usage

This is not a package - it's a full Laravel project that you should use as a starter boilerplate, and then add your own custom functionalities.

  • Clone the repository with git clone
  • Copy .env.example file to .env and edit database credentials there
  • Run composer install
  • Run php artisan key:generate
  • Run php artisan migrate
  • That's it: Test API's with Postman

Useful snippets to check

  • HasApiResponse Trait
  • render method in Handler.php
  • Facades keyword in controllers (Used as proxies for calling non-static method static)
  • Facades folder

** Note: Every api should hold Accept: Application/json in header. **

Package Rankings
Top 38.6% on Packagist.org
Related Projects