laravel-confetti maintained by karabin
Description
PHP wrapper around Confetti API
Author
Last update
2024/02/01 09:45
(dev-main)
License
Downloads
6
Tags
PHP wrapper around Confetti API
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.