Laravel Community Tools by Tighten

Category "Requests and Input" tricks

67 tricks
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 14156
When you want to check a Hashed value generated by `Hash::make()` you need to use `Hash::check('unhashed', $hashed)`. Every time you run `Hash::make('string')`, a different hash is made and will not match the previous one.
chadwithuh... 12 years ago 29465
4.0
When creating JS heavy apps some times you need to simulate a network delay so you can see how things are working as it's loading. This simple trick will do just that.
ericlbarne... 12 years ago 11347
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 51750