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 11 years ago 13516
İş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 11 years ago 7801
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 11 years ago 20004
You can use this when you want to add a placeholder to your Form::selectRange or Form::selectMonth.
soffan 11 years ago 11576
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 11 years ago 7848
In many case you want to display values in blade you can do some check sum like this:
star18bit 11 years ago 16592
Sub Form, Cascade Form, Form Inside Form
sayasuhend... 11 years ago 9350
Creates a link for a US telephone number.
leek 11 years ago 9666
Loading views from a different location, other than 'app/views'
Whyounes 12 years ago 9685