nunomaduro / phpinsights

🔰 Instant PHP quality checks from your console
https://phpinsights.com
MIT License
5.28k stars 279 forks source link

[Insight for Laravel] Verify that there is no usages of requests outside FormRequests or Controllers #13

Closed nunomaduro closed 3 years ago

nunomaduro commented 5 years ago

To solve this issue, you should create a pull request adding the Insight described on the title.

ijpatricio commented 5 years ago

Maybe leaving the classes where the the request can be used as configurable.

Think for example, DataTransferObjects. In https://github.com/spatie/data-transfer-object , a fromRequest constructor is adopted.

There might be more cases, so leaving calss / parent class as configurable might be a good solution.

nunomaduro commented 3 years ago

No plans to work on this at this time.