Skip to content

KarabinSE/laravel-confetti

Repository files navigation

PHP wrapper around Confetti API

Latest Version on Packagist

Total Downloads

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.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Sponsor this project

Packages

No packages published

Languages