jeffbeltran / bob
This is a Laravel package that will allow you to create query scopes that can be applied to an API's Endpoint dynamically via Query Strings.
Requires
- php: ^7.4
Requires (Dev)
- friendsofphp/php-cs-fixer: ^2.16
- orchestra/testbench: ^5.0
- phpunit/phpunit: ^9.0
- psalm/plugin-laravel: ^1.2
- vimeo/psalm: ^3.11
This package is auto-updated.
Last update: 2025-01-10 09:11:58 UTC
README
This is a Laravel package that will allow you to create query scopes that can be applied to an API's Endpoint dynamically via Query Strings.
In short, you can apply filters to your API endpoints like so
/posts?include=comments&author=2&sort=created_at,asc
This would return all posts for the author of ID 2, all comment relationships and sorted by created_at date (note: some assembly required)
Installation - WIP
You can install the package via composer:
composer require jeffbeltran/bob
You can publish and run the migrations with:
php artisan vendor:publish --provider="Jeffbeltran\Bob\BobServiceProvider" --tag="migrations" php artisan migrate
You can publish the config file with:
php artisan vendor:publish --provider="Jeffbeltran\Bob\BobServiceProvider" --tag="config"
This is the contents of the published config file:
return [
];
Usage - WIP
$bob = new Jeffbeltran\Bob(); echo $bob->echoPhrase('Hello, Jeffbeltran!');
Testing
composer test
Changelog
Please see CHANGELOG for more information on what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Security
If you discover any security related issues, please email jeffbeltran@gmail.com instead of using the issue tracker.
Credits
License
The MIT License (MIT). Please see License File for more information.