Download the PHP package berthott/laravel-targetable without Composer
On this page you can find all versions of the php package berthott/laravel-targetable. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download berthott/laravel-targetable
More information about berthott/laravel-targetable
Files in berthott/laravel-targetable
Download berthott/laravel-targetable
More information about berthott/laravel-targetable
Files in berthott/laravel-targetable
Vendor berthott
Package laravel-targetable
Short Description Laravel Helper for targeting classes by their traits
License MIT
Package laravel-targetable
Short Description Laravel Helper for targeting classes by their traits
License MIT
Please rate this library. Is it a good library?
Informations about the package laravel-targetable
Laravel-Targetable
Laravel Helper for targeting classes by their traits.
Installation
Usage
- Create your own service inheriting
berthott\Targetable\Services\TargetableService -
Pass the trait you want to target, and the config name you chose
- For further details on possibilities on how to utilize this service have a look inside
tests/BasicTargetable - You might use an interface instead of a trait by using
Mode::Contractas a 3rd argument on TargetableService
Options
To change the default options add the following options to your librarys config file:
namespace: String or array with one ore multiple namespaces that should be monitored for the configured trait. Defaults toApp\Models.namespace_mode: Defines the search mode for the namespaces.ClassFinder::STANDARD_MODEwill only find the exact matching namespace,ClassFinder::RECURSIVE_MODEwill find all subnamespaces. Defaults toClassFinder::STANDARD_MODE.prefix: Defines the route prefix. Defaults toapi.
Your config might look like this:
Compatibility
Tested with Laravel 10.x.
License
See License File. Copyright © 2023 Jan Bladt.
All versions of laravel-targetable with dependencies
PHP Build Version
Package Version
Requires
haydenpierce/class-finder Version
^0.4.3
The package berthott/laravel-targetable contains the following files
Loading the files please wait ...