Blade - How to use template layout in laravel? Specific examples, especially how to use @section, @stop, @show, @yield?
巴扎黑
巴扎黑 2017-05-16 16:53:33
0
1
363

I am a novice, but I just can’t understand the templates in Laravel and don’t use them very much. I don’t understand the examples on the official website. I hope friends who have learned it can give specific examples; especially @section, @stop, @show, @yield How to use these?
Then how to inherit?

巴扎黑
巴扎黑

reply all (1)
左手右手慢动作

yield is equivalent to defining a placeholder space in the parent. For example, if you name it a, you write a section and endsection in the child. The parameter is a, and then write the style code in it. When accessing the parent, the code segment in the child is inserted into This place of the Father. In the parent, you can write tags starting with section and ending with show, which means that code in the child page is allowed to be appended here. The actual result is very similar to the result of using yield with section, but the semantics are different. Personal opinion

    Latest Downloads
    More>
    Web Effects
    Website Source Code
    Website Materials
    Front End Template
    About us Disclaimer Sitemap
    php.cn:Public welfare online PHP training,Help PHP learners grow quickly!