【问题标题】:extending laravel blade comming to top将 laravel 刀片延伸到顶部
【发布时间】:2018-05-08 12:40:10
【问题描述】:

我是 laravel 的绝对初学者,我现在有一个基本结构,有一个包含视图结构的 app 模板,即

head

navbar

@yield("content")

footer

现在结构对于某些特定页面运行良好,我必须包含谷歌地图地图刀片放置在 includes/map.blade.php 这是我的索引刀片

    @extends("app")

    @section("content")

    the content goes here

    @extends("includes.map")

    @endsection

基本上在内容之后,我想将地图放在页脚上方,但不知何故,每当我尝试扩展它时,它总是出现在顶部

【问题讨论】:

  • 使用@include("includes.map")代替@extends("includes.map")

标签: laravel


【解决方案1】:

您不能使用两个扩展。 而不是@extends("includes.map") 使用@include("includes.map")

【讨论】:

    【解决方案2】:

    如果你想包含地图,那么它应该是@include (doc):

    @extends("app")
    
    @section("content")
    
    the content goes here
    
    @include("includes.map")
    
    @endsection
    

    【讨论】:

    • 完美的伙伴我是 laravel 的新手,所以现在不知道正确的约定!继续努力
    猜你喜欢
    • 2018-05-30
    • 2014-09-15
    • 2019-05-16
    • 2016-11-01
    • 1970-01-01
    • 1970-01-01
    • 2016-12-29
    • 2015-12-13
    • 2014-12-24
    相关资源
    最近更新 更多