Laravel Community Tools by Tighten

Popular tricks

459 tricks
Check if the request matches the url. If so, add an active class to the menu item.
xtrasmal 12 years ago 12736
Reference the connection by name, the database could be named differently in another environment.\ Note: you might want to add backticks to the database name if the name uses alternative characters.
orlissenbe... 11 years ago 12734
Gulp is a javascript taskrunner (like Grunt) using Nodejs. You can use it to automatically run PHPUnit tests on saved files. Ex: Save Foo.php and run FooTest.php automatically. Link to gist: https://gist.github.com/varghesejacob/56e2637dcb5cd2bc4b51
residualfl... 12 years ago 12750
An example of how I did my filters.php and routes.php to populate many of the same structured routes. Used Sentry 2 for Authentication and short syntax for array() Suggestions to make it even DRYer are welcome. php artisan route output of the example http://paste.laravel.com/1cnE
XoneFobic 12 years ago 12680
Leverage AI API to streamline resume parsing and data extraction in your HR Tech applications with AI-powered SharpAPI.
makowskid 1 year ago 12488
api
Sometimes you would like to restrict a certain route parameter. For instance, if you are using route parameters to determine the ID of a certain model you are using, you would only like digits to be passed, not alphabetical characters. You can set these restrictions on the route using ->where('<pattern>'). But what if you have a huge list of routes that all use the same pattern restriction? That's where this will come in handy.
stidges 12 years ago 12416
Here is how to beat Laravel to the punch when the database isn't playing nice. The error codes are specific to MySQL. You can easily substitute the error codes for whatever DB you are using. Below are 2 common errors. Here's a scrrenshot of the error page plus.google.com/113701899574492909448/posts/c4oAn7FDmLj
DragonI 12 years ago 12338
If you want to count the number of results from a relationship without actually loading them you may use the "withCount" method, which will place a "{relation}_count" column on your resulting models.
kupendra 7 years ago 12342
If you want your search functionality to be dynamic as possible to avoid code repetitions, you can use this trait directly in your models
kissartisa... 8 years ago 12326