Download the PHP package bssd-ltd/laravel-aspect without Composer
On this page you can find all versions of the php package bssd-ltd/laravel-aspect. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package laravel-aspect
Laravel-Aspect
Origin source can be found here
added serviceProvider
for Lumen
Add App\Providers\LumenAspectServiceProvider to your bootstrap/app.php file.
publish aspect module class
more command options [--help]
publish configure
-
basic
-
use tag option
- use provider
register aspect module
config/ytake-laravel-aop.php
use classes property
example
notice
- Must use a service container
- Classes must be non-final
- Methods must be public
for Lumen
override Bssd\LaravelAspect\AspectServiceProvider
bootstrap/app.php
Cache Clear Command
PreCompile Command
Annotations
@Transactional
for database transaction(illuminate/database)
you must use the TransactionalModule
- option
params | description |
---|---|
value (or array) | database connection |
expect | expect exception |
Multiple Transaction
Exception Rollback
Multiple Exception Rollback
@Cacheable
for cache(illuminate/cache)
you must use the CacheableModule
- option
params | description |
---|---|
key | cache key |
cacheName | cache name(merge cache key) |
driver | Accessing Cache Driver(store) |
lifetime | cache lifetime (default: 120min) |
tags | Storing Tagged Cache Items |
negative(bool) | for null value (default: false) |
@CacheEvict
for cache(illuminate/cache) / remove cache
you must use the CacheEvictModule
- option
params | description |
---|---|
key | cache key |
cacheName | cache name(merge cache key) |
driver | Accessing Cache Driver(store) |
tags | Storing Tagged Cache Items |
allEntries | flush(default:false) |
@CachePut
for cache(illuminate/cache) / cache put
you must use the CachePutModule
- option
params | description |
---|---|
key | cache key |
cacheName | cache name(merge cache key) |
driver | Accessing Cache Driver(store) |
lifetime | cache lifetime (default: 120min) |
tags | Storing Tagged Cache Items |
@Loggable / @LogExceptions
for logger(illuminate/log, monolog)
you must use the LoggableModule / LogExceptionsModule
- option
params | description |
---|---|
value | log level (default: \Monolog\Logger::INFO) should Monolog Constants |
skipResult | method result output to log |
name | log name prefix(default: Loggable) |
driver | logger driver or channel name - default using LOG_CHANNEL (.env settings) |
sample)
About @LogExceptions
Also, take a look at @Loggable. This annotation does the same, but also logs non-exceptional situations.
About @QueryLog
for database query logger(illuminate/log, monolog, illuminate/database)
@PostConstruct
The PostConstruct annotation is used on a method that needs to be executed after dependency injection is done to perform any initialization.
you must use the PostConstructModule
The method MUST NOT have any parameters
@RetryOnFailure
Retry the method in case of exception.
you must use the RetryOnFailureModule.
- option
params | description |
---|---|
attempts (int) | How many times to retry. (default: 0) |
delay (int) | Delay between attempts. (default: 0 / sleep(0) ) |
types (array) | When to retry (in case of what exception types). (default: <\Exception::class> ) |
ignore (string) | Exception types to ignore. (default: \Exception ) |
@MessageDriven
Annotation for a Message Queue(illuminate/queue. illuminate/bus).
you must use the MessageDrivenModule.
- option
params | description |
---|---|
value (Delayed) | \Bssd\LaravelAspect\Annotation\LazyQueue or \Bssd\LaravelAspect\Annotation\EagerQueue (default: EagerQueue) |
onQueue (string) | To specify the queue. (default: null) ) |
mappedName (string) | queue connection. (default: null/ default queue driver) |
LazyQueue
Handle Class Bssd\LaravelAspect\Queue\LazyMessage
EagerQueue
Handle Class Bssd\LaravelAspect\Queue\EagerMessage
Ignore Annotations
use config/ytake-laravel-aspect.php file
default: LaravelCollective/annotations
Append Custom Annotations
for testing
use none driver
All versions of laravel-aspect with dependencies
illuminate/console Version ^8.0
illuminate/filesystem Version ^8.0
illuminate/support Version ^8.0
illuminate/config Version ^8.0
illuminate/contracts Version ^8.0
illuminate/log Version ^8.0
illuminate/database Version ^8.0
illuminate/cache Version ^8.0
illuminate/events Version ^8.0
illuminate/bus Version ^8.0
illuminate/queue Version ^8.0
ray/aop Version ^2.9
doctrine/annotations Version ^1.11
nikic/php-parser Version ^4.0
psr/log Version ~1.0