Download the PHP package dangerwayne/laravel-specifications without Composer
On this page you can find all versions of the php package dangerwayne/laravel-specifications. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download dangerwayne/laravel-specifications
More information about dangerwayne/laravel-specifications
Files in dangerwayne/laravel-specifications
Package laravel-specifications
Short Description Elegant specification pattern implementation for Laravel with support for Eloquent queries and in-memory filtering
License MIT
Homepage https://laravel-specifications-doc.netlify.app
Informations about the package laravel-specifications
Laravel Specifications
A powerful implementation of the Specification Pattern for Laravel applications.
📚 Full Documentation | 📦 Packagist | ⚡ Quick Start
Features
- Artisan Generator: Create specifications with
php artisan make:specification - Eloquent Integration: Seamlessly works with Laravel's Eloquent ORM
- Collection Support: Filter in-memory collections using the same specifications
- Fluent Builder: Intuitive API for building complex specifications
- Composite Operations: Combine specifications with AND, OR, NOT operations
- Caching Support: Built-in caching for improved performance
- Laravel 11, 12, 13: Full compatibility with modern Laravel versions
- Type Safe: Full PHP 8.3+ type declarations and PHPStan level 6+ compliance
Installation
The package will automatically register its service provider.
Artisan Command
Generate specification classes effortlessly using the artisan command:
Command Options
Domain Organization
Organize specifications by domain or module:
Model Binding
Generate specifications bound to specific models:
Advanced Options
Combined Options
Publishing Stubs
Customize the generated specifications by publishing the stubs:
The stubs will be published to resources/stubs/specification/ where you can modify them to match your coding style and requirements.
Basic Usage
Using Pre-built Specifications
Creating Custom Specifications
Using the Fluent Builder
Combining Specifications
Working with Collections
Available Specifications
The package includes several pre-built specifications:
WhereSpecification
WhereInSpecification
WhereBetweenSpecification
WhereNullSpecification
WhereHasSpecification
Fluent Builder Methods
Configuration
Publish the configuration file:
Advanced Usage
Custom Specifications with Parameters
Complex Specifications
Testing
Code Quality
Changelog
Please see CHANGELOG for more information on what has changed recently.
Feedback & Support
We'd love to hear from you! Here are ways to provide feedback or get help:
- 🐛 Report Issues: Create an issue for bug reports
- 💡 Request Features: Suggest new features
- 💬 Ask Questions: Start a discussion or ask a question
- 📧 Email: For private inquiries, reach out to the maintainers
Contributing
We welcome contributions! Please see CONTRIBUTING for details on:
- How to report issues
- How to suggest features
- How to submit pull requests
- Development setup and standards
Security Vulnerabilities
Please review our security policy on how to report security vulnerabilities.
Credits
- Barry Stovall
- All Contributors
License
The MIT License (MIT). Please see License File for more information.
All versions of laravel-specifications with dependencies
illuminate/collections Version ^11.0|^12.0|^13.0
illuminate/database Version ^11.0|^12.0|^13.0
illuminate/support Version ^11.0|^12.0|^13.0