-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added view() method to route collections #6568
Conversation
a simple view: | ||
a simple view. These are always treated as GET requests. | ||
|
||
.. literalinclude:: routing/020.php | ||
.. literalinclude:: routing/065.php |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here is the description for Closures.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is fine to me. No matter how much I use that types of functions in Javascript, for some reason in PHP I find it not quite as easy to read. It works fine, though.
There is no $to parameter in the view() method.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Glanced through the changes, all looks good.
Description
#6525 again.
Added a new method to simplify rendering out views directly through routes. While you could do this with a closure, this is tidier and easier to read when using many of these.
This supports static info pages in sites, like About, Privacy, Terms, etc. It also supports a more view-first workflow, where the view is primary object, and View Cells are used to display the dynamic content.
Checklist: