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 10 years ago 32388
5.0
Using Angular and Blade
Mahmoudz 10 years ago 8168
Displaying different module/package dashboard widgets using view composers.
beanmoss 10 years ago 8894
Iteratively display "page breadcrumbs" - ideal for a partial.
Dombo 11 years ago 97260
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 8518
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 10012
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 10425
İş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 7753
Creates a link for a US telephone number.
leek 11 years ago 9633