Skip to content

Instantly share code, notes, and snippets.

@jameswagoner
jameswagoner / tenancy.mdc
Created July 12, 2025 14:34
tenancy v4 rule
---
description: Tenancy
alwaysApply: false
---
- **Use Stancl Tenancy v4 for all multi-tenancy logic**
- All tenant management, database separation, and domain mapping must use [Stancl Tenancy v4](https://tenancy-v4.pages.dev/tenants/).
- Do not implement custom tenancy logic outside of the package unless absolutely necessary.
- **Tenant Model**
- The tenant model **must** extend `Stancl\Tenancy\Database\Models\Tenant` and implement `Stancl\Tenancy\Database\Contracts\TenantWithDatabase` for multi-database setups.
@jameswagoner
jameswagoner / MonthlyCalendar.php
Last active December 18, 2020 01:19
Monthly calendar blade component Carbon and Tailwind CSS
<?php
namespace App\View\Components;
use Carbon\Carbon;
use Carbon\CarbonPeriod;
use Illuminate\View\Component;
class MonthlyCalendar extends Component
{