Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Laravel 4 Blade templates documentation

I'm new to Laravel 4. I don't seem to find adequate documentation on the Blade templating system.

I see some examples at http://laravel.com/docs/templates with no explanation.

Another example at Laravel 4 Controller Templating / Blade - Correct method?

Where are @section, @yield, @show, etc defined and documented? Where is the Blade templating system actually explained?

Or is it so new, or so "intuitive", that it needs no explanation? Or I could use another templating system that is better documented?

like image 416
Alex_B Avatar asked Jul 22 '13 16:07

Alex_B


People also ask

What is Laravel blade template?

Blade is the simple, yet powerful templating engine that is included with Laravel. Unlike some PHP templating engines, Blade does not restrict you from using plain PHP code in your templates.

Can I use blade template without Laravel?

You could download the class and start using it, or you could install via composer. It's 100% compatible without the Laravel's own features (extensions).

What is @yield used for in Laravel?

In Laravel, @yield is principally used to define a section in a layout and is constantly used to get content from a child page unto a master page.

What is @include in Laravel?

@include is just like a basic PHP include, it includes a "partial" view into your view. @extends lets you "extend" a template, which defines its own sections etc. A template that you can extend will define its own sections using @yield , which you can then put your own stuff into in your view file.


1 Answers

I would say Blade is so easy that it doesn’t need documentation.

Follow this link great tutorial by Jeffrey Way which will take you through everything you need to know.

https://tutsplus.com/lesson/templating-changes/

like image 192
GreGreg Avatar answered Sep 28 '22 23:09

GreGreg