Laravel Community Tools by Tighten

Popular tricks

458 tricks
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 12503
It's a bit tricky to figure out exactly where to put a breakpoint to quickly check your final sql statement before execution. This is for 4.2 but may be similar in
sgelbart 10 years ago 12472
There are not any option to disable view cache in Laravel but in windows you can use following .bat file out of box and in other OS's you can do something similar...
tuytoosh 7 years ago 12409
A simple setup for create an artisan make:repository command See more https://github.com/sexym0nk3y/Laravel-5.3-Repository
sexym0nk3y 10 years ago 12377
using same form request for create and update
hardevine 7 years ago 12338
If you know what nested sets are, and use lazychazer/laravel-nestedset package, and tried his example application (https://github.com/lazychaser/nestedset-app), then here is a snippet for replace his simple nav rendering to bootstrap (3.x) navbar compatible output. (Laravel 5 solution)
subdesign 11 years ago 12315
5.0
Starting from 4.1.28, Application::boot() does not initialize sensitive session data anymore. That is, it is accessible, but encrypted. So if you're integrating 3rd party library, which needs external authentification check through sessions, simple checking Auth::check() will not work. However, we can still use old $_SESSION variable. Examples of 3rd party libraries: CkFinder, elFinder (has Laravel package though), MoxieManager. N.B. If you can use Ajax calls for authorization checks, you can still make a custom API with JSON request to user-logged (as an example) to see if user is authentificated.
YOzaz 12 years ago 12186
A Link assets based on which controller is currently requested. Any improvements to this code are welcome
JonathanFr... 12 years ago 12112
Blade's path syntax is a little odd - it uses dots instead of slashes, and always requires you to start your paths from the views root. This Blade extension allows you to pass paths with slashes, and correctly resolves parent paths via the traditional ../ syntax. Lastly, the quoting of paths is optional.
davestewar... 11 years ago 12119