PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Wednesday, January 26, 2022

[FIXED] Pass image in yield section in laravel

 January 26, 2022     laravel, laravel-5     No comments   

Issue

For the <title> I've followed this SO answer This is working perfectly for part but the image is not working

Laravel dynamic page title in navbar-brand

But, Here when I try to make an image dynamic instead of title it's giving me a text instead of an image.

For instance,

header.blade.php

@yield('image')

In another blade, I called image as in section

@section('image', '<img src="http://localhost/appname/public/front/images/heading.png">')

Every page has a dynamic logo so I want to put logo dynamic the same like we're doing in the title.

But the result I'm getting is enter image description here

<img src="http://localhost/appname/public/front/images/heading.png">

Solution

You can do like this

@section('image')
 <img src="http://localhost/appname/public/front/images/heading.png">
@endsection


Answered By - Akram Wahid
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing