nam_co
2891
4
Laravel

Pass variable from layout (@extend) to view (@yield)

Posted 1 year ago by nam_co

Hi, I was wondering if someone has any suggestions on how to pass a variable from the layout blade template to the view file (with out any controller intervention)

In the layout template:

@yield('content')

In the blade view: @extends('default') @section('content') {{$hope}} @stop

Thanks in advance for any help

Please sign in or create an account to participate in this conversation.