mirror of
https://github.com/alrayyes/wiki.git
synced 2024-11-24 20:46:22 +00:00
23 lines
387 B
Markdown
23 lines
387 B
Markdown
---
|
|
date: 2020-11-16
|
|
id: e1692cfa-16bc-497a-aeb1-0a7468414155
|
|
title: Simpler Service Decoration
|
|
---
|
|
|
|
# Syntax
|
|
|
|
``` yaml
|
|
# config/services.yaml
|
|
services:
|
|
App\Mailer: ~
|
|
|
|
# Before
|
|
App\SpecialMailer:
|
|
decorates: App\Mailer
|
|
arguments: ['@App\SpecialMailer.inner']
|
|
|
|
# After
|
|
App\SpecialMailer:
|
|
decorates: App\Mailer
|
|
arguments: ['@.inner']
|
|
```
|