0

I am working with Laravel and created a master.blade view file to use on all my pages. The master view yields mini-views inside. On most mini-views everything works fine, but on some, I don't get the background image from the master. The problem is I still get the nav-bar and the footer on those pages, which means they do recognize the master view. What can be the reason for that?

On all pages I use the exact same way to include and to yield:

@extends('master')

@section('content')

@endsection

Thanks alot!

  • If your master has yield section mini-views then you should write @section('mini-views') – Ravi Hirani Sep 19 '16 at 08:52
  • 1
    If you are accessing your images by ('../') just do them like so ('/') I had the same problem before – Nour Sep 19 '16 at 09:08
  • The master file yields ('content'). I called them 'mini-views' to explain the situation. – user3185970 Sep 19 '16 at 09:28
  • I am accessing the image using: url('images/bgimg.jpg'). Should it also be a problem? The background image shows up in most pages, but not on all.. – user3185970 Sep 19 '16 at 09:30

1 Answers1

0

Just use full path to your file, start with /

zloter
  • 333
  • 3
  • 9