bernskioldmedia / laravel-better-proposals
This is an API wrapper class for the Better Proposals API.
Requires
- php: ^8.0.2
- guzzlehttp/guzzle: ^7.4
- illuminate/contracts: ^9.0
- spatie/laravel-package-tools: ^1.9.2
Requires (Dev)
- nunomaduro/collision: ^6.0
- nunomaduro/larastan: ^2.0.1
- orchestra/testbench: ^7.0
- pestphp/pest: ^1.21
- pestphp/pest-plugin-laravel: ^1.1
- phpstan/extension-installer: ^1.1
- phpstan/phpstan-deprecation-rules: ^1.0
- phpstan/phpstan-phpunit: ^1.0
- phpunit/phpunit: ^9.5
- roave/security-advisories: dev-latest
- spatie/laravel-ray: ^1.26
This package is auto-updated.
Last update: 2024-11-09 19:29:11 UTC
README
This package adds a fluent way of interacting with the Better Proposals proposal management system and its API.
Installation
You can install the package via composer:
composer require bernskioldmedia/laravel-better-proposals
You can publish the config file with:
php artisan vendor:publish --tag="better-proposals-config"
This is the contents of the published config file:
return [ /** * The API key used for authenticating with the Better Proposals API. */ 'api_key' => env('BETTER_PROPOSALS_API_KEY', ''), /** * The Base URL for the BetterProposals API including the version. * This package currently only supports V2 of the API. */ 'base_url' => env('BETTER_PROPOSALS_API_URL', 'https://api.betterproposals.io'), ];
Usage
The package provides a convenient facade to interact with all resources. The package will let you consume the API through fluent methods, but will not touch or map the response coming from the API. Please see the Better Proposals API docs for more information on responses.
The package currently supports all Better Proposals API resources. Your IDE should discover them on the facade when typing.
When getting lists using the all
method there are also fluent filtering methods to help you filter. Additionally, some
resources have "actions" as well. The names of these functions match mostly to the parameters in the Better Proposals
API docs.
use BernskioldMedia\BetterProposals\Facades\BetterProposals; BetterProposals::companies()->all(); BetterProposals::proposals()->signed(); BetterProposals::proposals()->all(); BetterProposals::proposals()->create(['...']);
Testing
composer test
Changelog
Please see CHANGELOG for more information on what has changed recently.
Credits
License
The MIT License (MIT). Please see License File for more information.