Laravel Community Tools by Tighten

Sergey

Joined: 12 years ago
Total tricks: 2
Last trick: 12 years ago

Submitted tricks

If you're like me, you don't like to keep repetitive ->where()'s in your routes file, this is where route patterns come in handy. Makes your routes file DRY too, especially when you'll need to change some expression.
vlakarados 12 years ago 51153
When you're into making an API, you may wish to make the format of the responses you provide dynamic. If you're not using controllers, you would make a class, but if you use controllers, it's a pretty good idea to place it in the base controller. As well you may restructure your response data to include more fields, e.g. for testing purposes you may wish to also include some custom debug.
vlakarados 12 years ago 13834