Download the PHP package dmdboi/laravel-autoscopes without Composer
On this page you can find all versions of the php package dmdboi/laravel-autoscopes. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download dmdboi/laravel-autoscopes
More information about dmdboi/laravel-autoscopes
Files in dmdboi/laravel-autoscopes
Download dmdboi/laravel-autoscopes
More information about dmdboi/laravel-autoscopes
Files in dmdboi/laravel-autoscopes
Vendor dmdboi
Package laravel-autoscopes
Short Description Automatically generate scope traits for Laravel Models based on foreign key relationships.
License MIT
Homepage https://github.com/dmdboi/laravel-autoscopes
Package laravel-autoscopes
Short Description Automatically generate scope traits for Laravel Models based on foreign key relationships.
License MIT
Homepage https://github.com/dmdboi/laravel-autoscopes
Please rate this library. Is it a good library?
Informations about the package laravel-autoscopes
Laravel Auto Scopes
Automatically generate type-safe scope traits for Laravel models based on foreign key relationships.
Installation
Quick Start
Generate scope traits for your models:
How It Works
Given models with foreign keys:
Running php artisan scopes:generate User:
- Creates
HasUserScopestrait inapp/Models/Traits/ - Auto-detects Post and Comment have
user_idcolumn (via database schema or $fillable) - Applies trait to both models automatically
Generated trait includes:
Commands
scopes:generate {model} - Generate a scope trait and auto-apply to related models
scopes:add {trait} - Apply existing trait to models (validates model exists)
Features
- Type Safe -
strict_types=1, genericBuilder<Model>type hints - Auto-Detection - Finds models with matching foreign keys
- Format Preserving - PHP-Parser preserves your code formatting
- Atomic - File locking prevents concurrent modification issues
- Secure - Path traversal protection built-in
Testing
Changelog
See CHANGELOG for recent changes.
Credits
- dmdboi
- All Contributors
License
The MIT License (MIT). See License File for details.
All versions of laravel-autoscopes with dependencies
PHP Build Version
Package Version
Requires
php Version
^8.2
illuminate/contracts Version ^11.0||^12.0
nikic/php-parser Version ^5.7
spatie/laravel-package-tools Version ^1.16
illuminate/contracts Version ^11.0||^12.0
nikic/php-parser Version ^5.7
spatie/laravel-package-tools Version ^1.16
The package dmdboi/laravel-autoscopes contains the following files
Loading the files please wait ...