vault backup: 2025-11-26 15:12:40

This commit is contained in:
Vincent Verbruggen
2025-11-26 15:12:40 +01:00
parent 5d55c88efb
commit dbe8119f52
6 changed files with 107 additions and 9 deletions

View File

@@ -1,3 +1,22 @@
<https://github.com/spatie/holidays>
https://github.com/spatie/holidays
#Carbon #TimeKeeping
Calculate public holidays for any country. Provides a unified interface to determine non-working holidays without maintaining separate holiday databases.
## Features
- Multi-country support via ISO 3166-1 codes
- Check if a specific date is a holiday
- Holiday names with localization support
- Query holidays within date ranges
- Region-specific holidays (e.g., German states)
## Usage
```php
Holidays::for('be')->get(); // Get all Belgian holidays
Holidays::for('nl')->isHoliday('2024-01-01'); // Check if date is holiday
```
```bash
composer require spatie/holidays
```
#php #laravel #holidays #calendar #dates #scheduling #localization #spatie

View File

@@ -0,0 +1,18 @@
https://github.com/BrekiTomasson/laravel-tagged-cache
A wrapper around Laravel's cache that simplifies caching within Eloquent models. Uses cache tags for automatic differentiation instead of complex key naming conventions.
## Features
- Trait-based integration (`HasTaggedCache`) for models
- Automatic tag generation based on model and ID
- Auto-flush cache when specified attributes change
- Auto-flush on model deletion
## Requirements
Requires a cache driver that supports tags (Redis, Memcached). Does not work with file, DynamoDB, or database drivers.
```bash
composer require brekitomasson/laravel-tagged-cache
```
#laravel #cache #redis #memcached #eloquent #tags #model-caching #invalidation

View File

@@ -1 +1,15 @@
https://ollieread.com/articles/a-minimal-identity-map-for-laravel-eloquent
https://ollieread.com/articles/a-minimal-identity-map-for-laravel-eloquent
Implementation pattern (not a package) that ensures each database row has a unique representation in memory. Multiple queries for the same row return the identical object instance rather than separate copies.
## Problem Solved
Without an identity map, Eloquent creates multiple instances of the same database row. If you update a User model in one place, changes are not reflected in other places holding a different instance of the same row.
## How It Works
- Static registry stores model instances mapped by class name and primary key
- Hooks capture newly queried models via `newFromBuilder()`
- Freshly created models added via the `created` event
- Deleted models removed via `deleting`/`forceDeleting` events
- Subsequent queries update existing instances rather than creating duplicates
#laravel #eloquent #pattern #identity-map #orm #caching #memory

View File

@@ -1,3 +1,17 @@
<https://github.com/simshaun/recurr>
https://github.com/simshaun/recurr
#Carbon #TimeKeeping
PHP library for working with recurrence rules (RRULE, RFC 5545 standard) and converting them into DateTime objects. Useful for calendar applications and scheduling systems.
## Features
- Parse and create RRULE recurrence rules
- Transform rules into DateTime collections
- Generate human-readable descriptions of recurrence patterns
- Multi-language support for text output
- Apply constraints and filters (Before, After, Between)
- Handles edge cases like month-end dates
```bash
composer require simshaun/recurr
```
#php #rrule #recurrence #calendar #scheduling #datetime #recurring-events

View File

@@ -1,3 +1,21 @@
<https://github.com/avocet-shores/laravel-rewind>
https://github.com/avocet-shores/laravel-rewind
#Versioning #packages
Versioning package for Laravel Eloquent models. Automatically tracks model changes and allows jumping backwards or forwards through version history.
## Features
- Rewind to previous versions or fast-forward to newer ones
- Jump directly to specific version numbers
- Uses partial diffs + full snapshots for storage efficiency
- Thread-safe with cache locking
- Exclude sensitive attributes (passwords, tokens) from versioning
- Clone models at specific historical points
- Non-destructive linear history
## Usage
Add the `Rewindable` trait to your Eloquent model.
```bash
composer require avocet-shores/laravel-rewind
```
#laravel #eloquent #versioning #audit #history #changelog #undo

View File

@@ -1,3 +1,18 @@
<https://github.com/tonysm/rich-text-laravel?tab=readme-ov-file>
https://github.com/tonysm/rich-text-laravel
#WYSIWYG
Integrates the Trix Editor with Laravel, inspired by Rails' Action Text. Provides a complete solution for managing rich text content with attachments.
## Features
- Store rich text content separately from models using dedicated RichText model
- Automatic attachment extraction and content minimization
- Encrypted rich text attributes support
- Content attachments with SGID (Signed Global ID)
- Image galleries and link extraction
- Blade components for Trix input
- Eager loading via `withRichText()` scope
```bash
composer require tonysm/rich-text-laravel
```
#laravel #trix #wysiwyg #rich-text #editor #attachments #content