Laravel Community Tools by Tighten

Tag "4.0" tricks

68 tricks
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 14936
Laravel passes 100% test coverage on Hip Hop Virtual Machine (HHVM) so you might want to try using it to host your next Laravel application. The advantage of HHVM is an increase in speed of executing your PHP scripts and thus boosting your application. This config was provided by Taylor Otwell.
msurguy 12 years ago 21557
Creating a form macro is very easy and awesome for creating your own UI elements. The original downside I found was losing the automatic model binding from Form::model(). A user on StackOverflow helped solve the problem for me.
chadwithuh... 12 years ago 10180
An easy helper method that will assist in setting active classes for navigation items based on the current route.
mattems 12 years ago 27654
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 20290
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 13867
Laravel 4 have a lot of features some hidden :) for some developers, i found the option to run artisan commands from route or controller, like Artisan::call('migrate:install'); or Artisan::call('migrate', [ '--path'=>'app/database/migrations' ]); Artisan::call('db:seed'); it is usefull when you don't have access to the console in share hosting environments.
Bradley 12 years ago 87507
4.0
When you want to check a Hashed value generated by `Hash::make()` you need to use `Hash::check('unhashed', $hashed)`. Every time you run `Hash::make('string')`, a different hash is made and will not match the previous one.
chadwithuh... 12 years ago 29152
4.0
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 8678