Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/xqsit94/laravel-webservice-example-boilerplate
Laravel Webservice Example/Boilerplate using laravel7.x and sanctum - Clone and add your own custom functionalities
https://github.com/xqsit94/laravel-webservice-example-boilerplate
api laravel restful-api sanctum webservice
Last synced: 16 days ago
JSON representation
Laravel Webservice Example/Boilerplate using laravel7.x and sanctum - Clone and add your own custom functionalities
- Host: GitHub
- URL: https://github.com/xqsit94/laravel-webservice-example-boilerplate
- Owner: xqsit94
- Created: 2020-05-09T13:23:47.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2023-02-01T19:54:20.000Z (almost 2 years ago)
- Last Synced: 2024-12-13T11:57:33.592Z (21 days ago)
- Topics: api, laravel, restful-api, sanctum, webservice
- Language: PHP
- Homepage:
- Size: 226 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## Laravel Webservice Example/Boilerplate
* [Laravel 7.x](https://laravel.com/docs/7.x)
* [Sanctum](https://laravel.com/docs/7.x/sanctum)
* Magical Facades Pattern## 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. **