what editor are you using?
eg with PHPStorm you can write Templates for recurring code (blocks) or maybe you can install the Emmet package in your editor
I think there are many ways to do this.
Like @frezno said, the easiest way is to use PHPStorm Live Template, or Sublime Text Snippet.
Laravel side, if HTML class still has the macro() function, you could also do similar thing like that as well. (Haven't got time to grab a copy of L5 yet...)
Well, you don't always have to rely on Laravel, overall it could be done on client side.
$("input[type=submit]").addClass("btn").addClass("btn-primary");
Laravel: Form::submit('save',array('class'=>'btn btn-primary'));
You could also just use HTML syntax and benefit from autocomplete for style classes. (I had the same problem and for now decided to not use Illuminate\Html) Imho just html is easier to understand and live templates make it just as fast.
Maybe I missed the pros of Illuminate\Html? If so what makes this package so great?
Need to use this now:
"laravelcollective/html": "~5.0",
But for an editor siotuation it depends on what editor that you are using.
I'm a die hard fan of BBEdit but have been trying to transition to PHPStorm. PHPStorm offers license to people who offer open source projects and decent discounts to students. Then again Sublime is "sort of free" to use ...
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community