Laravel Community Tools by Tighten

Popular tricks

458 tricks
sometime we need to autocomplete one input area and based on the value of this input area we sometime populated a dynamic dropdown . I thought it worth sharing .
hassanjama... 11 years ago 35596
I have added a sitemap to this very site and was thinking that some of you want to do the same for SEO purposes. The way to add a sitemap would be pretty easy by using a Blade template for the XML that sitemap requires but there is an easier solution. You can use a package from https://github.com/RoumenDamianoff/laravel4-sitemap that would make it super simple to generate a sitemap for your Laravel application. See for yourself.
msurguy 12 years ago 35201
If you're not making use of MySQL InnoDB cascades, you might still want to cause events (such as deleting) on related models to cascade. The example below listens for the deleted event on the Product model and cascades this to the child models.
robjmills 12 years ago 34864
We have already known the usage of accessors and mutators. We use accessors in laravel model to modify any field data while retrieving the records and mutators to modify any field data while inserting to database. So, to modify any field before, we needed two separate methods for a single filed i.e. one method for accessor and one for mutator but in latest laravel release I mean in laravel 8.77.0, we can use a single method for both accessor and mutator using closure . Given below is the syntax for single mehtod accessor and mutator:
asifzcpe 4 years ago 34590
Laravel package making you able to perform several process instead of executing them through one process Installation
karam-must... 4 years ago 34567
A free PHP tool for developer
farukaziz 3 years ago 34464
cli
In this example I use Monolog for logging user activity in my cms admin. Usage: add the following line to the controller's constructor: UserLog::write();
subdesign 11 years ago 33695
4.2
If you want to redirect all HTTP traffic to HTTPS (SSL) you can use this method. However, note that this may NOT work out of the box if you are behind CloudFlare/load balancer/reverse proxy unless you set a trusted proxy, more info here: http://www.laravel-tricks.com/tricks/fix-ssl-in-laravel-4-when-server-is-behind-a-load-balancer-or-a-reverse-proxy
zOxta 11 years ago 32840
adding default current timestamp.
Mahmoudz 10 years ago 32839