Laravel Community Tools by Tighten

Tag "4.1" tricks

72 tricks
For example, if you are using a caching server which listens on HTTPS, which retrieves your content from another (local server) which isn't using HTTPS, your links might be generated as http://mysite.com instead of the desired https://mysite.com. With this trick you can circumvent this.
berendiwem... 12 years ago 9032
Further explanation: http://www.codinghobo.com/re-organising-laravel-applications-with-psr-4/
rmasters 12 years ago 19185
Combining Model Observers and Cache Tags for very simple but elegant automatic cache flushing on Eloquent Model updates. Can handle both a Model and its Relations easily!
nik-418 12 years ago 30256
Use this to generate a select box from a Eloquent Collection
xLink 12 years ago 11317
For those who don't know. These ways of code are equivalent.
egig 12 years ago 10182
Sometimes you need to use some packages only in your local environment, like for debug purposes. You can include service providers in your local configuration file app/config/local/app.php. You have to worry about indexes since if you just paste service provider, it will overwrite one with same index in original configuration.
lazychaser 12 years ago 8967
In the background create your paginated response however you wish.
clouddueli... 12 years ago 48335
When you save the password fields, it's been hashed every time. You have to put it in your User model. Thanks to Karl Merkli to add needsRehash
HakShinKen 12 years ago 9665
4.1
I have a legacy system that uses SHA1 for passwords as opposed to bcrypt, which is used by Laravel. For now, I need people to be able to access through both systems. I use the auth.attempt event to handle password conversion.
madshadow 12 years ago 14902