Comments (4)
I always prefer to use the Request
classes to validate and authorise requests before the hit the controller.
IMO leaves less room for accidental changes which cause operations to happen before the request has been validated/authorised.
from code-standards.
I think we're all agreed on just not using Validator::make()
unless absolutely necessary, so lets get that written down.
+1 for request classes, here's a good example which encapsulates validation, authorization + determining things about the request:
from code-standards.
I think ValidatesRequests
are appropriate in the right place (when it's a one off and not huge). As soon as we see repetition, request classes are a must
from code-standards.
I am going to close this RFC on Friday 22nd March and add the outcomes to the coding standards.
from code-standards.
Related Issues (20)
- [backend/hatchly] Creating reusable sections
- [frontend/css] Namespacing and avoiding pollution of the global namespace
- RFC - Model definitions HOT 4
- [frontend/blade] Section directives HOT 1
- RFC - Formatting of API endpoints HOT 21
- RFC - Route method definitions HOT 2
- RFC - Route parameter definitions HOT 2
- RFC - Commit message tense HOT 3
- RFC - Commit message JIRA ID Prefix HOT 2
- RFC - Vue SFC spacing between tags HOT 1
- Populating image alt text with image name HOT 5
- Class names and IDs should be hyphenated
- Add tech stack page HOT 1
- Case Conventions HOT 7
- RFC - Logical NOT operator spacing
- Multi-line conditionals format HOT 2
- RFC - Controller method parameter ordering HOT 5
- RFC - Passing data to views HOT 2
- Add recommended services
- Eslint rule: arrow-parens HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from code-standards.