Todo:laravel using the Blade label Layout page
650) this.width=650; "class=" Alignnone size-full wp-image-1150 "src=" http://www.todosomeone.com/wp-content/uploads/ 2016/12/cfcd208495d565ef66e7dff9f98764da-3.jpg "width=" 865 "height=" 444 "style=" border:0px;vertical-align:middle; margin:0px auto;height:auto; "alt=" cfcd208495d565ef66e7dff9f98764da-3.jpg "/>
This article mainly introduces the use of Laravel label, unified Layout page. It is mainly used to label @yield,@ Stack, @extends, @section, @stop, @push. Streamline code, improve page download speed, performance, and content separation. From the developer's point of view, the Web page can be extracted from the same content to separate, so that each page code to display the theme content, concise, and less interference information.
1. Laravel's blade Tag code format is "named. blade.php", which is not very concise.
2. Create a unified layout style code template main.blade.php, using the HTML5 code structure, has the tag header,main,footer,35 line code to complete a style layout.
650) this.width=650; "class=" Alignnone size-full wp-image-1151 "src=" http://www.todosomeone.com/wp-content/uploads /2016/12/cfcd208495d565ef66e7dff9f98764da-4.jpg "width=" 865 "height=" 617 "style=" Border:0px;vertical-align:middle ; margin:0px Auto;height:auto; "alt=" cfcd208495d565ef66e7dff9f98764da-4.jpg "/>
3. Create a new page a.blade.php, use this @ Extends references the parent template main.blade.php,layouts is the path to the template.
650) this.width=650; "class=" Alignnone size-full wp-image-1152 "src=" http://www.todosomeone.com/wp-content/uploads/ 2016/12/cfcd208495d565ef66e7dff9f98764da-5.jpg "width=" 865 "height=" 382 "style=" border:0px;vertical-align:middle; margin:0px auto;height:auto; "alt=" cfcd208495d565ef66e7dff9f98764da-5.jpg "/>
4. From the two page code we can see Laravel Blade Basic use Method, in the sub-page definition @section definition code, in the master template use @yield, you can output the corresponding code, fully system Laravel concise elegance.
5. In main.blade.php we see the @stack, how to use this, as long as the a.blade.php created @push can be used, to do more expansion.
6. This is a simple label to use, and the unified page layout used, hoping to have an enlightening effect on you.
Wxgzh:ludong86
650) this.width=650; "class=" AlignCenter size-full wp-image-845 "src=" http://www.todosomeone.com/wp-content/uploads /2016/11/qrcode_for_gh_6bb1f39ae99c_258-1.jpg "alt=" qrcode_for_gh_6bb1f39ae99c_258-1 "width=" 258 "height=" 258 " style= "border:0px;vertical-align:middle;margin:0px auto;height:auto;text-align:center;"/>
This article is from the computer language driven data blog, so be sure to keep this source http://onetodo.blog.51cto.com/12321875/1883637
Todo:laravel using the Blade label Layout page