https://github.com/protoqol/quasi
This package generates API resources with keys preset to their respective table's columns.
https://github.com/protoqol/quasi
laravel php protoqol qol quasi resources
Last synced: about 1 year ago
JSON representation
This package generates API resources with keys preset to their respective table's columns.
- Host: GitHub
- URL: https://github.com/protoqol/quasi
- Owner: Protoqol
- Created: 2022-03-11T20:50:45.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2023-06-24T15:40:17.000Z (about 3 years ago)
- Last Synced: 2025-04-18T07:51:32.054Z (about 1 year ago)
- Topics: laravel, php, protoqol, qol, quasi, resources
- Language: PHP
- Homepage:
- Size: 98.6 KB
- Stars: 22
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: .github/README.md
- Contributing: .github/CONTRIBUTING.md
Awesome Lists containing this project
README

# Quasi
[](https://packagist.org/packages/protoqol/quasi)
Ever thought it was a bit tedious to define an API resource for a large table? This package makes life a bit
simpler by presetting all columns in a Resource, so you can simply remove the ones you don't need, instead of adding the
ones you need.
### Want to help keep open-source sustainable?
You can help by contributing to the code or donating using the button below!
Both are highly appreciated and contribute directly to keeping open-source free and sustainable!
[](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=TJS5BKNE3JGW8)
## Installation
You can install the package via composer:
```bash
composer require protoqol/quasi
```
Optional - Publish configuration file with:
```php
php artisan vendor:publish --tag=quasi-config
```
## Usage
```php
// Table name is "guessed" based of the resource name and will result in 'users' in this case.
php artisan make:qresource UserResource
// Table name is given as the second argument.
php artisan make:qresource UserResource users
```
### Config
```php
// The keys defined in this config will always be excluded from resources - if they exist as a key in the table.
'exclude' => [
// 'id',
],
```
### Changelog
Please see [CHANGELOG](CHANGELOG.md) for more information what has changed recently.
## Credits
- [Quinten Justus](https://github.com/protoqol)
- [All Contributors](../../contributors)
## License
The GNU GPL (GPL). Please see [License File](LICENSE.md) for more information.