Laravel Community Tools by Tighten

Tag "templating" tricks

57 tricks
I like to set body id/class from within the child view (for css purposes). Previously I was passing this information to the view from the controller but decided I didn't like that, so I came up with this.
jwalton512 11 years ago 10368
İş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 7702
When showing a website through a Facebook Page tab validation errors are not displayed, because Facebook "forgets" the sessions due to the page proxy. One problem with this is that session data is destroyed / forgotten on each request going through that proxy. This applies to Redirect::back()->withErrors($validator) for showing the form with validation errors because sessions are used . To avoid this simply fiddle the error data together and pass it directly to the respective action that handles the input form. One thing to mention is that calling other controller actions directly of course does not affect the route. Let's say editing happens at "/edit" and the "registration complete" message is shown at "/complete". Calling the action within the controller the form with errors is now shown at "/complete" whereas "/edit" would be shown if you redirected back (Line 22). I personally don't really care too much about this since the "real" web address is not shown in the FB page tab anyway due to the page proxy. Looking forward to hearing your opinions on this. Maybe there is even a better way.
flei 11 years ago 13859
‍ക്ക് പരിക്കേറ്റിട്ടുണ്ട്. മരണസംഖ
Bribin 11 years ago 0
blade extension that displays numbers in Farsi instead of Latin ( "۵" instead of "5").
reshadman 11 years ago 7962
Hi ! Write your templates, controllers, ... without boring with translations. When you have finished to code, just execute the following command. It will generate and synchronise all needed files in your `lang/*/` directories. The package is available here : https://github.com/potsky/laravel-localization-helpers
potsky 11 years ago 11106
Using of the Bootstrap Error classes for flash message, one simple helper would help to simply to extend the flash messages.
yoosuf 12 years ago 17709
Sometimes you want to render a partial without sharing all the scope. I often found that the scope inheritance between highly decoupled UI modules makes hard to find errors, because we end up using similar variable names in each module (using @include) Let me show you an example:
fedeisas 12 years ago 10220
Sometimes, you may want to use different pagination types across your application. By default, Laravel will use the type specified in your app/config/view.php file, so you need to override this setting when you wish to use another type. Here is how to do so.
coucou 12 years ago 11325