PHPackages                             doyosi/easy-event - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Framework](/categories/framework)
4. /
5. doyosi/easy-event

ActiveLibrary[Framework](/categories/framework)

doyosi/easy-event
=================

Simple, extensible event manager for Laravel.

1.1.3(9mo ago)011MITPHPPHP ^8.2

Since Aug 9Pushed 9mo agoCompare

[ Source](https://github.com/Doyosi/EasyEvent)[ Packagist](https://packagist.org/packages/doyosi/easy-event)[ RSS](/packages/doyosi-easy-event/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (10)Dependencies (6)Versions (13)Used By (0)

> Simple, extensible event manager for Laravel 12 with Web/Panel routes, API, helpers, Vite wiring, and an installer CLI.

✨ Features
----------

[](#-features)

- Migration with practical fields (type, title, description, starts/ends, all\_day, location, status, meta)
- Model + handy scopes (published, today, thisMonth, upcoming, past, between)
- Web + Panel controllers &amp; routes (macros to mount anywhere)
- JSON API (GET list + show) with flexible query params
- Helpers + Facade for quick access in Blade/Controllers
- Vite installer that scaffolds JS widget and patches `vite.config.js`
- Safe uninstall, restore Vite inputs from manifest, and automatic backups

🧩 Requirements
--------------

[](#-requirements)

- PHP **8.2+**
- Laravel **12.x**

📦 Installation
--------------

[](#-installation)

Add via Composer (packagist or path repo):

```
composer require doyosi/easy-event
```

Or local dev (example):

```
{
  "repositories": [ { "type": "path", "url": "packages/doyosi/easy-event" } ]
}
```

```
composer require doyosi/easy-event:"*@dev"
```

Install assets + DB:

```
php artisan doyosi:event --install
# optional: also wire Vite and run dev
php artisan doyosi:event --install --vite --run-npm=dev
```

### Seed sample data

[](#seed-sample-data)

```
php artisan db:seed --class="Doyosi\EasyEvent\Database\Seeders\EasyEventSeeder"
# or during install:
php artisan doyosi:event --install --seed
```

Publish manually (optional):

```
php artisan vendor:publish --provider="Doyosi\EasyEvent\EasyEventServiceProvider" --tag=easy-event-config
php artisan vendor:publish --provider="Doyosi\EasyEvent\EasyEventServiceProvider" --tag=easy-event-migrations
php artisan migrate
```

⚙️ Configuration
----------------

[](#️-configuration)

`config/easy-event.php`:

```
return [
    'table' => 'easy_events',
    'routes' => [
        'web' => [ 'enabled' => true, 'prefix' => 'events', 'name' => 'easy-events.', 'middleware' => ['web'] ],
        'panel'=> [ 'enabled' => true, 'prefix' => 'panel/easy-events', 'name' => 'panel.easy-events.', 'middleware' => ['web','auth'] ],
        'api'  => [
            'enabled' => true,
            'prefix'  => 'api/easy-events', // final URL will be /api/easy-events
            'name'    => 'easy-events.api.',
            'middleware' => ['api'], // add 'auth:sanctum' if needed
            'paginate_default' => 0,
            'per_page' => 15,
            'max_limit' => 100,
        ],
    ],
    'pagination' => 15,
    'date_format' => 'Y-m-d H:i',
    'status' => ['draft', 'published', 'archived'],
    'types'  => ['meeting','holiday','webinar','workshop','custom'],
];
```

🗄️ Database
-----------

[](#️-database)

Migration creates table (default `easy_events`) with columns:

- `id` (PK)
- `event_id` (nullable string, external id)
- `type` (string, indexed)
- `title` (string)
- `description` (text, nullable)
- `starts_at` (datetime, indexed)
- `ends_at` (datetime, nullable, indexed)
- `all_day` (boolean)
- `location` (string, nullable)
- `status` (string: draft|published|archived)
- `meta` (json, nullable)
- timestamps + composite index on `starts_at, ends_at`

🧠 Model &amp; Scopes
--------------------

[](#-model--scopes)

`Doyosi\EasyEvent\Models\Event`

```
Event::published();
Event::type('webinar');
Event::between('2025-08-01', '2025-08-31');
Event::upcoming();
Event::past();
Event::today();
Event::thisMonth();
```

🧭 Routes
--------

[](#-routes)

Auto-loaded if enabled in config. You can also mount explicitly via macros:

```
// routes/web.php
Route::easyEvents();        // public views
Route::easyEventsPanel();   // panel CRUD
Route::easyEventsApi();     // JSON API
```

- Web: `GET /events`, `GET /events/{event}`
- Panel: `GET /panel/easy-events`, create/store/edit/update/destroy
- API: `GET /api/easy-events`, `GET /api/easy-events/{event}`

🔧 Helpers &amp; Facade
----------------------

[](#-helpers--facade)

Helpers:

```
easy_events_today($limit = null);
easy_events_month($limit = null);
easy_events_recent($limit = 5);
easy_events_upcoming($limit = 10);
```

Facade:

```
use EasyEvent; // alias provided
EasyEvent::upcoming(5);
```

🧰 CLI — Installer
-----------------

[](#-cli--installer)

```
php artisan doyosi:event \
  [--install] [--vite] [--run-npm=dev|build] \
  [--uninstall] [--purge] [--drop-table] \
  [--restore-vite[=path]] [--backup] [--force]
```

**Options**

- `--install` publish config &amp; migrations, run `migrate`
- `--vite` scaffold `resources/js/easy-event.js` + `modules/EasyEventWidget.js` and patch `vite.config.js` (idempotent)
- `--run-npm=dev|build` run npm script
- `--uninstall` remove Vite entry &amp; JS scaffolds (preserves user-modified files by renaming to `.bak`)
- `--purge` (with `--uninstall`) delete published config &amp; migration files
- `--drop-table` (with `--uninstall`) drop events table
- `--restore-vite[=path]` rewrite `input: []` from manifest (default `doyosi.vite.json`)
- `--backup` create timestamped `vite.config.js.*.bak` before any edit
- `--force` skip confirmations

**Examples**

```
# typical install with vite and dev server
php artisan doyosi:event --install --vite --run-npm=dev

# clean uninstall but keep DB & config
php artisan doyosi:event --uninstall

# full purge and drop table (CI/non-interactive)
php artisan doyosi:event --uninstall --purge --drop-table --force

# regenerate vite inputs from manifest (creates template if missing)
php artisan doyosi:event --restore-vite --backup
```

### Vite manifest

[](#vite-manifest)

`doyosi.vite.json` (created if missing when `--restore-vite` is used):

```
{
  "input": [
    "resources/css/app.css",
    "resources/js/app.js",
    "resources/js/easy-event.js",
    "resources/js/web.js",
    "resources/js/panel.js"
  ]
}
```

🧩 JS Widget (Native ESM)
------------------------

[](#-js-widget-native-esm)

The installer creates:

- `resources/js/modules/EasyEventWidget.js`
- `resources/js/easy-event.js`

Blade usage:

```
@vite('resources/js/easy-event.js')

```

Widget auto-inits on `[data-easy-event]` and fetches JSON.

🌐 API Overview
--------------

[](#-api-overview)

Two endpoints (read-only):

- `GET /api/easy-events` — list
- `GET /api/easy-events/{event}` — single

**Query params for list**

- `limit` (int) — return N items (no pagination)
- `paginate` (0|1) — enable pagination (default from config)
- `per_page` (int) — with `paginate=1`
- `scope` (today|month|upcoming|past)
- `type` (string) — filter by event type
- `status` (string) — one of config `status`
- `from`, `to` (date/datetime) — explicit range (overrides `scope`)

**Response shapes**

- Default &amp; `limit` → **array of Event** (no wrapper)
- `paginate=1` → `{ data: Event[], links: {...}, meta: {...} }` (paginator uses data wrapper)

**Event JSON fields**

```
{
  "id": 1,
  "event_id": null,
  "type": "webinar",
  "title": "Intro to EasyEvent",
  "description": "...",
  "starts_at": "2025-08-15T10:00:00+03:00",
  "ends_at": "2025-08-15T11:00:00+03:00",
  "starts_at_formatted": "2025-08-15 10:00",
  "ends_at_formatted": "2025-08-15 11:00",
  "all_day": false,
  "location": "Online",
  "status": "published",
  "meta": {}
}
```

**cURL examples**

```
# list default
curl -s http://localhost/api/easy-events | jq .

# upcoming limited
curl -s "http://localhost/api/easy-events?scope=upcoming&limit=5" | jq .

# paginated
curl -s "http://localhost/api/easy-events?paginate=1&per_page=10" | jq .

# single
curl -s http://localhost/api/easy-events/1 | jq .
```

**Auth** By default uses `['api']` middleware. Add `auth:sanctum` (or any) in `config/easy-event.php` → `routes.api.middleware`.

🧪 Testing (suggested)
---------------------

[](#-testing-suggested)

- Factory for `Event`
- Scope unit tests (today/thisMonth/upcoming/past/between)
- API feature tests (list filters, pagination, single show, 404 for draft)

🪪 License
---------

[](#-license)

MIT — see LICENSE.

🤝 Contributing
--------------

[](#-contributing)

PRs welcome. Please follow PSR-12 and include tests.

###  Health Score

34

—

LowBetter than 77% of packages

Maintenance58

Moderate activity, may be stable

Popularity5

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity56

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

12

Last Release

279d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/50c8698cb4b7433997625fac6082b80996e3037a246d5cc10734e24270487142?d=identicon)[doyosi](/maintainers/doyosi)

---

Top Contributors

[![Karyazilim](https://avatars.githubusercontent.com/u/13747215?v=4)](https://github.com/Karyazilim "Karyazilim (18 commits)")

### Embed Badge

![Health badge](/badges/doyosi-easy-event/health.svg)

```
[![Health](https://phpackages.com/badges/doyosi-easy-event/health.svg)](https://phpackages.com/packages/doyosi-easy-event)
```

###  Alternatives

[laravel/cashier

Laravel Cashier provides an expressive, fluent interface to Stripe's subscription billing services.

2.5k25.9M107](/packages/laravel-cashier)[laravel/pulse

Laravel Pulse is a real-time application performance monitoring tool and dashboard for your Laravel application.

1.7k12.1M99](/packages/laravel-pulse)[laravel/passport

Laravel Passport provides OAuth2 server support to Laravel.

3.4k85.0M532](/packages/laravel-passport)[roots/acorn

Framework for Roots WordPress projects built with Laravel components.

9682.1M97](/packages/roots-acorn)[laravel/mcp

Rapidly build MCP servers for your Laravel applications.

71510.9M66](/packages/laravel-mcp)[laravel/cashier-paddle

Cashier Paddle provides an expressive, fluent interface to Paddle's subscription billing services.

264778.4k3](/packages/laravel-cashier-paddle)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
