Skip to content
This repository was archived by the owner on Mar 12, 2024. It is now read-only.

Commit 5e07700

Browse files
Update README.md
1 parent 2746eb6 commit 5e07700

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

README.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,14 @@ class CompanyProfile extends Component
6262
```
6363

6464
## Why?
65-
Why should I use it like this instead of just passing the model to the view?
66-
Because the models are huge objects and you probably shouldn't expose them to the frontend for security and performance reasons. Another thing is primitive view variables are highly customizable through view composers, while it's harder to decorate in the case of using models.
65+
Why should I use it like this instead of just passing the model to the view? It's because the models are huge objects and you probably shouldn't expose them to the frontend for security and performance reasons. Another thing is primitive view variables are highly customizable through view composers, while it's harder to decorate in the case of using models.
66+
67+
## Logging
68+
As the package doesn't throw an error in case of failed assignment (for example type incompatibility), you may wish to log such an event. The package has failed assignment logging disabled by default, but you can turn it on by publishing the config:
69+
70+
```bash
71+
php artisan vendor:publish --tag="model-mapper-config"
72+
```
6773

6874
## Testing
6975
```bash

0 commit comments

Comments
 (0)