PHPackages                             dot-env-it/laravel-calendar - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. dot-env-it/laravel-calendar

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

dot-env-it/laravel-calendar
===========================

A high-performance FullCalendar wrapper for Laravel.

v1.0.5(1mo ago)1129↓100%[1 PRs](https://github.com/dot-env-it/laravel-calendar/pulls)MITPHPPHP ^8.2CI passing

Since Apr 21Pushed 3w agoCompare

[ Source](https://github.com/dot-env-it/laravel-calendar)[ Packagist](https://packagist.org/packages/dot-env-it/laravel-calendar)[ Fund](https://www.buymeacoffee.com/jagdish.j.ptl)[ Fund](https://paypal.me/jagdishjptl)[ RSS](/packages/dot-env-it-laravel-calendar/feed)WikiDiscussions main Synced 1w ago

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

DotEnv Calendar for Laravel
===========================

[](#dotenv-calendar-for-laravel)

  ![Laravel Calendar](https://camo.githubusercontent.com/c6c1b6f0e9b6a10a8c864f4a574926bc2beb28d7598579b7ee90829b89e48549/68747470733a2f2f62616e6e6572732e6265796f6e64636f2e64652f4c61726176656c25323043616c656e6461722e706e673f7061747465726e3d746f706f677261706879267374796c653d7374796c655f3226666f6e7453697a653d3130307078266d643d312673686f7757617465726d61726b3d31267468656d653d6c69676874267061636b6167654d616e616765723d636f6d706f7365722b72657175697265267061636b6167654e616d653d646f742d656e762d69742532466c61726176656c2d63616c656e646172266465736372697074696f6e3d412b686967682d706572666f726d616e63652b46756c6c43616c656e6461722b777261707065722b666f722b4c61726176656c2e26696d616765733d68747470732533412532462532467777772e7068702e6e6574253246696d616765732532466c6f676f732532466e65772d7068702d6c6f676f2e737667)[![Latest Stable Version](https://camo.githubusercontent.com/0bbdcbc96b8a1a5747ed7c1abd1f07b2d32eac690e8d7d995b524e34224542d8/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f646f742d656e762d69742f6c61726176656c2d63616c656e6461722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/dot-env-it/laravel-calendar)[![Total Downloads](https://camo.githubusercontent.com/3860d85e454fe6d5203dbb6db9a3752eba454c9c504963c4ecdc0c51cb2e6d44/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f646f742d656e762d69742f6c61726176656c2d63616c656e6461722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/dot-env-it/laravel-calendar)[![License](https://camo.githubusercontent.com/dde0c173875e3fac3c1d1aa8240ec545a36138f5e75b9d2bcd30c435565e9c9d/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f646f742d656e762d69742f6c61726176656c2d63616c656e6461722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/dot-env-it/laravel-calendar)

**A high-performance, reactive calendar suite for Laravel applications.**

Built on the robust **FullCalendar 6** core and powered by \*\* Livewire \*\* and **Alpine.js**, this package provides a seamless bridge between your Eloquent models and a sophisticated frontend schedule. Transform any database record into a calendar event with zero boilerplate and maintain a professional, desktop-grade user experience on your Dashboard.

---

🚀 Key Capabilities
------------------

[](#-key-capabilities)

- **Eloquent-to-Calendar Mapping:** Seamlessly integrate any model using the `HasCalendarEvents` trait. You can add multiple model's events by just adding `HasCalendarEvents` trait.
- **Livewire Reactivity:** Real-time state synchronization; your calendar reflects database changes without a single page refresh.
- **Professional Grid Engine:** Full support for `dayGridMonth`, `timeGridWeek`, and `listWeek` layouts.
- **Intelligent Smart Filtering:** Integrated filtering that automatically manages visibility based on your data density.
- **Interactive Persistence:** Native drag-and-drop support for rescheduling, with automatic database persistence.
- **Dynamic UI Orchestration:** Support for custom event prefixes, mapping of custom color attributes, and deep-linking to specific module resources.

---

Become a sponsor [![](https://camo.githubusercontent.com/d2432db86e1cfca636933728a664bf886cff501efab549a0af6abab26fe8851b/68747470733a2f2f696d672e736869656c64732e696f2f7374617469632f76313f6c6162656c3d53706f6e736f72266d6573736167653d254532253944254134266c6f676f3d47697448756226636f6c6f723d253233666538653836)](https://github.com/sponsors/jagdish-j-p)
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

[](#become-a-sponsor-)

Your support allows me to keep this package free, up-to-date and maintainable. Alternatively, you can **[spread the word!](http://twitter.com/share?text=I+am+using+this+cool+Laravel+Calendar+package&url=https://github.com/dot-env-it/laravel-calendar&hashtags=Calendar,PHP,Laravel)**

---

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

[](#-installation)

```
composer require dot-env-it/laravel-calendar
```

---

🛠️ Implementation Guide
-----------------------

[](#️-implementation-guide)

### 1. Configure Your Model

[](#1-configure-your-model)

Apply the trait and define the `calendar_fillable` schema. You can map `color` to a standard database column or a **custom attribute** (Accessor) for dynamic styling or `class` to add bootstrap/tailwind class.

```
use DotEnv\Calendar\Traits\HasCalendarEvents;
use Illuminate\Database\Eloquent\Casts\Attribute;

class Task extends Model
{
    use HasCalendarEvents;

    protected $calendar_fillable = [
        'title'      => 'name',                    // Source column for event labels
        'date_field' => 'next_date',             // required if `date` is custom attribute
        'date'       => 'due_date',                // Source column for temporal data
        'color'      => 'event_color',             // Maps to a DB column or custom attribute
        'class'      => 'bootstrap/tailwind classes name',  // Maps to a DB column or custom attribute
        'route'      => 'tasks.show',              // Target named route for click actions
        'link_id'    => 'id',                      // Optional Primary key for route resolution,(required only if primary key is not id)
        'prefix'     => '📌 ',                     // Branding/Iconography prefix
        'editable'   => 'can_edit'                    // You can make any record editable / draggable by adding any boolean value, i.e. create attribute which returns some boolean condition
    ];

    /**
     * Example: Custom attribute for editable
     */
    protected function canEdit(): Attribute
    {
        return Attribute::make(
            get: fn () => $this->role === 'admin',
        );
    }

    /**
     * Example: Custom attribute for dynamic coloring
     */
    protected function eventColor(): Attribute
    {
        return Attribute::make(
            get: fn () => $this->priority === 'high' ? '#e74c3c' : '#3498db',
        );
    }
}
```

### 2. Frontend Dependencies

[](#2-frontend-dependencies)

Ensure your application layout includes the industry-standard Select2 and FullCalendar 6 assets to power the interactive components.

---

🖥️ Production Usage
-------------------

[](#️-production-usage)

Deploy the calendar component directly into your Dashboard or any administrative view:

```

```

---

### Conditional Filtering (Advanced)

[](#conditional-filtering-advanced)

To control which records appear on the calendar (e.g., only active tasks or user-specific events), you can use two primary methods:

#### A. Using Global Scopes

[](#a-using-global-scopes)

Since the calendar fetches events via your Eloquent models, applying a [Global Scope](https://www.google.com/search?q=https://laravel.com/docs/11.x/eloquent%23global-scopes) will automatically filter the events displayed.

```
// In your Model
protected static function booted(): void
{
    static::addGlobalScope('active', function (Builder $builder) {
        $builder->where('status', 'active');
    });
}
```

#### B. Using `applyCalendarFilters`

[](#b-using-applycalendarfilters)

For more control—or to apply filters specifically to the calendar without affecting the rest of your application—you can define an `applyCalendarFilters` method in your model. The package will automatically detect and call this method when fetching events.

```
use Illuminate\Database\Eloquent\Builder;

class Task extends Model
{
    use HasCalendarEvents;

    /**
     * Specifically filter records for the calendar view
     */
    public function applyCalendarFilters(Builder $query): Builder
    {
        return $query->where('user_id', auth()->id())
                     ->whereNull('deleted_at')
                     ->where('is_private', false);
    }
}
```

---

- **Scoped Queries:** Use standard Laravel Global Scopes or the dedicated `applyCalendarFilters` method to ensure users only see the data they are authorized to view.

---

**Note:** Using `applyCalendarFilters` is the recommended approach if you want to display a subset of data on the calendar (like "Upcoming Deadlines") while keeping the model's default behavior untouched elsewhere in your app.

### Smart Filtering Logic

[](#smart-filtering-logic)

The component features an intelligent filtering system driven by your configuration and data:

- **Automatic Hiding:** The filter UI will **automatically hide** itself if only one model type is registered (preventing redundant UI elements).
- **Global Toggle:** Enable or disable the filtering capability globally via the configuration file.
- **Manual Override:** Force the filter state at the component level: ```

    ```

---

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

[](#️-global-configuration)

Publish and refine the `config/laravel-calendar.php` file to align the calendar with your organization’s operational settings:

```
return [
    'enable_filter' => true, // Global default for the Select2 filter
    'default_time' => '10:30:00', // if database has date field then to show this time instead of 00:00:00

    /*
    |--------------------------------------------------------------------------
    | Dynamic Event Styling
    |--------------------------------------------------------------------------
    | The package automatically colors events based on their date.
    | You can use Bootstrap/Tailwind classes or HEX codes.
    */
    'colors' => [
        'past' => ['class' => 'bg-danger text-white', 'color' => '#dc3545'],
        'today' => ['class' => 'bg-warning text-dark', 'color' => '#ffc107'],
        'tomorrow' => ['class' => 'bg-info text-white', 'color' => '#17a2b8'],
        'future' => ['class' => 'bg-success text-white', 'color' => '#28a745'],
    ],

    'businessHours' => [
        'daysOfWeek' =>, // Standard Work Week
        'startTime' => '08:30',
        'endTime' => '17:30',
    ],
    'hideWeekends' => false,
];
```

---

⌨️ Developer Events
-------------------

[](#️-developer-events)

Leverage custom browser events to integrate the calendar with your application's wider notification ecosystem:

- **`dot-env-calendar:refreshed`**: Dispatched upon successful data synchronization.
- **`dot-env-calendar:create-new-event`**: Dispatched upon day click
- **`dot-env-calendar:view-event-details`**: Dispatched upon event click with eventId
- **`dot-env-calendar:event-updated`**: Dispatched following successful database update via drag-and-drop.

---

📄 License
---------

[](#-license)

The MIT License (MIT). For further details, please consult the License File.

###  Health Score

45

—

FairBetter than 91% of packages

Maintenance93

Actively maintained with recent releases

Popularity16

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity52

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 95.7% 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

6

Last Release

48d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/4e7c021b8f19406056e9a24ec8d268cec00f1a9d77bd72d8cc5cb0a6fbc6a178?d=identicon)[Jagdish-J-P](/maintainers/Jagdish-J-P)

---

Top Contributors

[![Jagdish-J-P](https://avatars.githubusercontent.com/u/20887370?v=4)](https://github.com/Jagdish-J-P "Jagdish-J-P (22 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (1 commits)")

### Embed Badge

![Health badge](/badges/dot-env-it-laravel-calendar/health.svg)

```
[![Health](https://phpackages.com/badges/dot-env-it-laravel-calendar/health.svg)](https://phpackages.com/packages/dot-env-it-laravel-calendar)
```

###  Alternatives

[livewire/flux

The official UI component library for Livewire.

9466.8M119](/packages/livewire-flux)[jantinnerezo/livewire-alert

This package provides a simple alert utilities for your livewire components.

8111.3M20](/packages/jantinnerezo-livewire-alert)[venturedrake/laravel-crm

A free open source CRM built as a package for laravel projects

39910.0k](/packages/venturedrake-laravel-crm)[ramonrietdijk/livewire-tables

Dynamic tables for models with Laravel Livewire

21355.6k](/packages/ramonrietdijk-livewire-tables)[lakm/laravel-comments

Integrate seamless commenting functionality into your Laravel project.

40614.3k1](/packages/lakm-laravel-comments)[noerd/noerd

101.3k6](/packages/noerd-noerd)

PHPackages © 2026

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