Laravel Community Tools by Tighten

Category "Templating" tricks

34 tricks
Get the base URL of your Laravel 5 app page available anywhere in your JavaScript for jQuery to use. To do this you could have the following code in your template.blade.php file...
cpaddison 11 years ago 32740
5.0
Using Angular and Blade
Mahmoudz 11 years ago 8420
Displaying different module/package dashboard widgets using view composers.
beanmoss 11 years ago 9191
Iteratively display "page breadcrumbs" - ideal for a partial.
Dombo 11 years ago 97740
If you are using the same template in a lot of places and might later need an easy way to switch out the template for a different one without having to go through all views that implement it or replacing the current template, then consider using a constant to pass this parameter. Doing this will allow you to switch out your template for any other template at any time in nearly no time at all.
The Saint... 11 years ago 8890
Hi, I got the example by Dastan Turysbekov (http://laravelsnippets.com/snippets/menu-activated) and changed a little bit. It's a simple Macro to use with Active Menu. You can use parameters and attributes as well.
marcelofer... 11 years ago 10350
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 12 years ago 10883
İş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 8035
Creates a link for a US telephone number.
leek 12 years ago 9894