Download the PHP package litepie/database without Composer
On this page you can find all versions of the php package litepie/database. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download litepie/database
More information about litepie/database
Files in litepie/database
Package database
Short Description Advanced Laravel Database package with enhanced Eloquent traits, scopes, casts, and utilities for modern Laravel applications
License MIT
Homepage https://github.com/litepie/database
Informations about the package database
Litepie Database Package
An advanced Laravel database package that provides enhanced Eloquent traits, scopes, casts, and utilities for modern Laravel applications. This package extends Laravel's Eloquent ORM with powerful features for archiving, searching, caching, slugs, and more.
Features
Core Traits (14 Available)
- 📦 Versionable: Track model version history with rollback capability
- 🏷️ Metable: Flexible key-value metadata storage (WordPress-style)
- 🌍 Translatable: Multi-language content support with automatic locale handling
- 🔍 Searchable: Powerful search with multiple strategies (full-text, fuzzy, weighted, boolean)
- ⚡ Cacheable: Smart caching with tags, invalidation, and warm-up strategies
- 🔗 Sluggable: Advanced slug generation with multiple strategies
- 📄 Paginatable: Cursor, seek, window, and cached pagination for large datasets
- 📊 Aggregatable: Statistical analysis and reporting (23 analytics methods)
- 🗃️ Archivable: Soft archiving with reasons and user tracking
- 📤 Exportable: Export data to CSV, Excel, JSON formats
- 📥 Importable: Import and validate data from CSV
- 🔢 Sortable: Manual ordering and drag-drop support
- 📋 Batchable: Efficient bulk operations for large datasets
- 📏 Measurable: Query performance monitoring and optimization
Additional Features
- 💰 Money Handling: Robust money casting with multi-currency support
- 📊 JSON Enhancement: Advanced JSON casting with schema validation
- 🔧 Custom Macros: Dynamic model macro system for extending Eloquent
- 🎯 Smart Scopes: Advanced query scopes for complex filtering
🤖 AI-Ready Package
This package is fully optimized for AI-assisted development! Use with GitHub Copilot, Cursor AI, ChatGPT, Claude, and other AI coding tools. See AI Integration Guide for details.
Installation
Install the package via Composer:
Requirements
- PHP 8.2, 8.3, or 8.4
- Laravel 10.x, 11.x, or 12.x
- MySQL 5.7+, PostgreSQL 10+, or SQLite 3.8+
Laravel Auto-Discovery
The package will automatically register its service provider and facades through Laravel's package auto-discovery feature.
Manual Registration (Optional)
If you need to manually register the service provider, add it to your config/app.php:
Publishing Configuration
Optionally, publish the configuration file:
Quick Start for AI Tools
Ask your AI assistant natural questions like:
Your AI will reference this package's comprehensive documentation in the .ai/ directory to provide accurate, working code.
Common Use Cases
CMS / Blog
E-commerce Product
Analytics Dashboard
User Preferences
For complete examples and AI integration details, see:
- 📖 AI Integration Guide
- 🚀 Quick Reference
- 💻 Code Examples
- 📝 AI Prompts
Usage
1. Version Control (Versionable Trait)
Track complete version history with rollback capability.
See examples/versionable_example.php for 20 detailed examples.
2. Custom Metadata (Metable Trait)
WordPress-style flexible key-value storage.
See examples/metable_example.php for 20 detailed examples.
3. Multi-Language (Translatable Trait)
Support multiple languages with automatic locale handling.
See examples/translatable_example.php for 20 detailed examples.
4. Analytics & Reporting (Aggregatable Trait)
23 powerful methods for statistics and reporting.
See examples/aggregatable_example.php for 31 detailed examples.
5. Archivable Trait
The enhanced Archivable trait provides soft archiving functionality with additional features like reason tracking and user auditing.
Basic Usage
Migration
Add archive columns to your table:
Examples
6. Advanced Searchable Trait
Powerful search capabilities with multiple strategies.
Basic Setup
Search Examples
7. Intelligent Caching Trait
Smart caching with automatic invalidation and warm-up strategies.
Setup
Caching Examples
8. Enhanced Sluggable Trait
Advanced slug generation with multiple strategies and configurations.
Setup
Slug Examples
9. Paginatable Trait
Advanced pagination methods optimized for large datasets.
Setup
Pagination Examples
When to Use Each Method
Cursor Pagination (cursorPaginate):
- ✅ Large datasets (> 100K rows)
- ✅ Infinite scroll
- ✅ Real-time data
- ❌ Need page numbers
Fast Pagination (fastPaginate):
- ✅ Don't need total count
- ✅ "Load More" button
- ✅ Better performance than standard
- ❌ Need page numbers
Seek Pagination (seekPaginate):
- ✅ Real-time feeds (Twitter, Facebook style)
- ✅ Activity streams
- ✅ Best performance
- ❌ Need traditional pagination
Optimized Pagination (optimizedPaginate):
- ✅ Very large tables (> 1M rows)
- ✅ Need total count
- ✅ Uses approximate count
- ❌ Need exact count
Cached Pagination (cachedPaginate):
- ✅ Expensive count queries
- ✅ Heavy joins/aggregations
- ✅ Caches total count
- ✅ Any dataset size
Window Pagination (windowPaginate):
- ✅ Deep pagination (page 1000+)
- ✅ Large datasets
- ✅ Better than OFFSET
- ⚠️ Database-specific (MySQL/PostgreSQL)
10. Enhanced JSON and Money Casts
JSON Cast with Schema Validation
Money Cast with Currency Support
11. Model Macros
Extend Eloquent models with custom macros.
12. Advanced Query Features
Filtering and Searching
Migration Macros
The package provides helpful migration macros:
Configuration
The package comes with sensible defaults, but you can customize behavior by publishing and modifying the configuration file:
Testing
Run the test suite:
Contributing
Please see CONTRIBUTING.md for details on how to contribute to this project.
Security
If you discover any security-related issues, please email [email protected] instead of using the issue tracker.
Credits
- Renfos Technologies
- All Contributors
License
The MIT License (MIT). Please see License File for more information.
Changelog
Please see CHANGELOG.md for more information on what has changed recently.
Support
- 📧 Email: [email protected]
- 🐛 Issues: GitHub Issues
- 💬 Discussions: GitHub Discussions
🏢 About
This package is part of the Litepie ecosystem, developed by Renfos Technologies.
Organization Structure
- Vendor: Litepie
- Framework: Lavalite
- Company: Renfos Technologies
Links & Resources
- 🌐 Website: https://lavalite.org
- 📚 Documentation: https://docs.lavalite.org
- 💼 Company: https://renfos.com
- 📧 Support: [email protected]
Built with ❤️ by Renfos Technologies
Empowering developers with robust Laravel solutions
All versions of database with dependencies
illuminate/database Version ^12.0
illuminate/support Version ^12.0
illuminate/cache Version ^12.0
illuminate/encryption Version ^12.0