I scanned a few of my current projects, and over 99% of the time I'm returning a view from a controller, I use the global view() helper, but that < 1% would be nice to cover too.
Sometimes if you need to set a response header or alter the status code, I'll use Response::view() or response()->view().
I'm contemplating standardizing on response()->view() since it returns a concrete Response type, whereas the global view helper returns a much larger union type.
I scanned a few of my current projects, and over 99% of the time I'm returning a view from a controller, I use the global
view()
helper, but that < 1% would be nice to cover too.Sometimes if you need to set a response header or alter the status code, I'll use
Response::view()
orresponse()->view()
.I'm contemplating standardizing on response()->view() since it returns a concrete
Response
type, whereas the global view helper returns a much larger union type.