Download the PHP package plank/laravel-model-resolver without Composer
On this page you can find all versions of the php package plank/laravel-model-resolver. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download plank/laravel-model-resolver
More information about plank/laravel-model-resolver
Files in plank/laravel-model-resolver
Package laravel-model-resolver
Short Description Retrieve all defined Models available in the Application or Vendor namespaces
License MIT
Homepage https://github.com/plank/laravel-model-resolver
Informations about the package laravel-model-resolver
Laravel Model Resolver
Resolve all defined Models from the application or dependencies.
Table of Contents
- Installation
- Quick Start
- Configuration
- Usage
- all
- fromTable
- implements
- implementsAll
- implementsAny
- uses
- usesAll
- usesAny
- Contributing
- Credits
- License
- Security Vulnerabilities
- About Plank
Installation
You can install the package via composer:
You can publish the config file with:
Quick Start
- Install the package
- Run
composer dump-autoload --optimize
Configuration
The configuration file allows you to customize:
- The repository implementation which resolves the defined Models
- Namespaces to ignore from being scanned for Models
Usage
It is crucial to note that this package relies on the existence of the file vendor/composer/autoload_classmap.php
which is created by running composer dump-autoload --optimize
. If this file does not exist, the package will fail to resolve Models and throw an error.
all
This method returns the class strings of all Models defined in the application and vendor namespaces.
fromTable
This method returns a class string of the Model which defines that table name, if one exists.
implements
This method returns the class strings of Models which implement the given interface.
implementsAll
This method returns the class strings of the Models which implement all the given interfaces.
implementsAny
This method returns the class strings of the Models which match any of the given interfaces. This is method should not exist as common interfaces should be extracted, but this method allows shortcuts where appropriate.
uses
This method returns the class strings of all Models that use the given trait.
usesAll
This method returns the class strings of Models that use all the given traits.
usesAny
This method returns the class strings of Models that use all the given traits.
Contributing
Please see CONTRIBUTING for details.
Credits
- Kurt Friars
- All Contributors
License
The MIT License (MIT). Please see License File for more information.
Security Vulnerabilities
If you discover a security vulnerability within siren, please send an e-mail to [email protected]. All security vulnerabilities will be promptly addressed.
Check Us Out!
Plank focuses on impactful solutions that deliver engaging experiences to our clients and their users. We're committed to innovation, inclusivity, and sustainability in the digital space. Learn more about our mission to improve the web.
All versions of laravel-model-resolver with dependencies
illuminate/contracts Version ^12.0
spatie/laravel-package-tools Version ^1.19