https://github.com/friendsofcat/laravel-api-model-server
https://github.com/friendsofcat/laravel-api-model-server
Last synced: 24 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/friendsofcat/laravel-api-model-server
- Owner: friendsofcat
- License: mit
- Created: 2022-08-02T00:30:58.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2024-01-09T19:18:05.000Z (about 2 years ago)
- Last Synced: 2024-01-09T20:37:11.456Z (about 2 years ago)
- Language: PHP
- Size: 102 KB
- Stars: 1
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# laravel-api-model-server
Easy to implement configurable API solution for Eloquent Models.
Goes hand in hand with [Laravel API model package.](https://github.com/friendsofcat/laravel-api-model)
## Features:
* Configurable schema - used as a transformation layer between model and API
* allow / restrict specific attributes
* allow / restrict specific scopes
* allow eager load specific relations with possibility to allow only specific columns
* ability to set attribute / scope aliases
* allow specific methods like ‘get’, ‘exists’, ‘count’, ‘avg’ etc. (defaults to ‘get’, ‘exists’)
* allow raw clauses (restricted by default)
* Validates incoming payload according to schema
* Prepares data for query builder
* Builds query