Laravel Community Tools by Tighten

Category "Views" tricks

71 tricks
Sometimes you'll need to put custom fields in your dropdown field, like user's firstname and name. That's how you can do it.
the-juju 12 years ago 13720
İşin Türkçesi şu: Controller dan Master içine değer aktarılarak tüm view ler için özelleştirilebilir head meta tag yada diğer değişmesini istediğimiz dinamik alanların oluşturulması..
doguhan 12 years ago 7988
You have election data in your database. Perhaps each candidate has 1 record, with his/her name and number of votes. The percentage of the vote that each candidate attained can be calculated per candidate, without having to loop through the data. Laravel's Collection class provides the `sum($column_name)` method, which sums the column totals. This can then be used to calculate the vote share. I've used PHP's `format_number` function to round up the final percentage. Extra points given for a bootstrap progress bar, to illustrate the vote share.
meigwilym 12 years ago 20203
You can use this when you want to add a placeholder to your Form::selectRange or Form::selectMonth.
soffan 12 years ago 11809
I made a response macro that makes use of the JSend specification (http://labs.omniti.com/labs/jsend). UPDATE (2014-09-15): Added the setting of the content type.
icylace 12 years ago 8040
In many case you want to display values in blade you can do some check sum like this:
star18bit 12 years ago 16816
Sub Form, Cascade Form, Form Inside Form
sayasuhend... 12 years ago 9530
Creates a link for a US telephone number.
leek 12 years ago 9841
Loading views from a different location, other than 'app/views'
Whyounes 12 years ago 9938