https://github.com/bernskioldmedia/laravel-better-proposals
This is an API wrapper for the Better Proposals API.
https://github.com/bernskioldmedia/laravel-better-proposals
Last synced: 4 months ago
JSON representation
This is an API wrapper for the Better Proposals API.
- Host: GitHub
- URL: https://github.com/bernskioldmedia/laravel-better-proposals
- Owner: bernskioldmedia
- License: mit
- Created: 2022-07-03T13:41:21.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2023-10-09T16:35:44.000Z (over 1 year ago)
- Last Synced: 2024-04-15T20:14:40.107Z (about 1 year ago)
- Language: PHP
- Size: 46.9 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Laravel Better Proposals API
[](https://packagist.org/packages/bernskioldmedia/laravel-better-proposals)
[](https://github.com/bernskioldmedia/laravel-better-proposals/actions?query=workflow%3Arun-tests+branch%3Amain)
[](https://github.com/bernskioldmedia/laravel-better-proposals/actions?query=workflow%3A"Check+%26+fix+styling"+branch%3Amain)
[](https://packagist.org/packages/bernskioldmedia/laravel-better-proposals)This package adds a fluent way of interacting with the [Better Proposals](https://betterproposals.io) proposal
management system and its API.## Installation
You can install the package via composer:
```bash
composer require bernskioldmedia/laravel-better-proposals
```You can publish the config file with:
```bash
php artisan vendor:publish --tag="better-proposals-config"
```This is the contents of the published config file:
```php
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](https://betterproposals.io/resources/api/)
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.```php
use BernskioldMedia\BetterProposals\Facades\BetterProposals;BetterProposals::companies()->all();
BetterProposals::proposals()->signed();
BetterProposals::proposals()->all();
BetterProposals::proposals()->create(['...']);
```## Testing
```bash
composer test
```## Changelog
Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.
## Credits
- [Bernskiold Media](https://github.com/bernskioldmedia)
- [All Contributors](../../contributors)## License
The MIT License (MIT). Please see [License File](LICENSE.md) for more information.