karabin / laravel-confetti
PHP wrapper around Confetti API
Fund package maintenance!
Karabin
Requires
- php: ^8.1
- illuminate/contracts: ^10.0
- saloonphp/laravel-plugin: ^3.0
- saloonphp/saloon: ^3.0
- spatie/laravel-package-tools: ^1.14.0
Requires (Dev)
- laravel/pint: ^1.0
- nunomaduro/collision: ^7.8
- orchestra/canvas: ^8.11
- orchestra/testbench: ^8.8
- pestphp/pest: ^2.20
- pestphp/pest-plugin-arch: ^2.0
- pestphp/pest-plugin-laravel: ^2.0
README
Basic API wrapper for Confetti events api
Installation
You can install the package via composer:
composer require karabin/laravel-confetti
You can publish the config file with:
php artisan vendor:publish --tag="laravel-confetti-config"
This is the contents of the published config file:
return [ 'token' => env('CONFETTI_API_KEY', ''), ];
Usage
Get all events
use Karabin\Confetti\Facades\Confetti; $params = [ 'filter[signupType]' => 'rsvp', 'filter[type]' => 'future', 'page[size]' => 10, 'page[number]' => $request->input('page', 1), 'include' => 'categories,pages,pages.blocks,pages.blocks.images,images.image', ]; $events = Confetti::getEvents($params);
Get open events
use Karabin\Confetti\Facades\Confetti; $params = [ 'filter[signupType]' => 'rsvp', 'filter[type]' => 'future', 'page[size]' => 10, 'page[number]' => $request->input('page', 1), 'include' => 'categories,pages,pages.blocks,pages.blocks.images,images.image', ]; $events = Confetti::getOpenEvents($params);
Get single event
use Karabin\Confetti\Facades\Confetti; $params = [ 'include' => 'categories,pages,pages.blocks,pages.blocks.images,images.image', ]; $event = Confetti::getEvent($id, $params);
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.