Download the PHP package beyondcode/laravel-scope-checks without Composer
On this page you can find all versions of the php package beyondcode/laravel-scope-checks. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download beyondcode/laravel-scope-checks
More information about beyondcode/laravel-scope-checks
Files in beyondcode/laravel-scope-checks
Package laravel-scope-checks
Short Description Automatically convert your Eloquent scopes to boolean check methods.
License MIT
Homepage https://github.com/beyondcode/laravel-scope-checks
Informations about the package laravel-scope-checks
Laravel Scope Checks
Automatically convert your Eloquent scopes to boolean check methods.
This package allows you to automatically call all your eloquent model scope methods as checks.
Installation
You can install the package via composer:
Usage
All you need to do to be able to call your scopes as check methods is add the HasScopeChecks
trait to your eloquent model.
You can either call your check methods using the is
or the has
naming prefix on your model instances. For example:
When you make use of dynamic scopes (like the scopeRating
method), you can also pass the additional scope parameters to the check methods:
Testing
Changelog
Please see CHANGELOG for more information on what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Security
If you discover any security related issues, please email [email protected] instead of using the issue tracker.
Credits
- Marcel Pociot
- All Contributors
License
The MIT License (MIT). Please see License File for more information.