Laravel Community Tools by Tighten

Category "Debugging" tricks

36 tricks
logs a sql query with bindings replace by actual values
eugene_san... 12 years ago 9197
Avoid casting views to strings. If your view contains an error, casting with `(string)` will cause a less-than-helpful exception to be thrown, pertaining to throwing an exception within the view's `__toString()` method. Use `View::make()->render()` instead.
kwoodfrien... 12 years ago 23308
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 12531
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 8983
Handling findOrFail exceptions
bwsewell 12 years ago 53974
What if instead of using debugging bar like https://github.com/barryvdh/laravel-debugbar or others, you could use something that integrates directly with Chrome's web developer tools? Imaging viewing request information, headers, get and post data, cookies, session data, DB queries, routes and timing, all within Chrome's developer tools panel? With this extension, you can! Read the instructions below to know how!
msurguy 12 years ago 20269
Use this trick to log queries using Monolog. Add this to your routes.php and log straight into your Firebug console. Firebug needs the FirePHP add-on. - kisses Netbulae
xtrasmal 12 years ago 12675
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 13851
Sometimes the compiled file could get corrupted and not function properly, breaking your Laravel installation. This is a list of steps you could use trying to fix a Laravel installation that previously worked just fine on a server.
msurguy 12 years ago 8668