duncan3dc / blade

Use Blade templates without the full Laravel framework
Apache License 2.0
144 stars 36 forks source link

How to set default for @yield via @include file #23

Closed hoangnamitc closed 4 years ago

hoangnamitc commented 4 years ago

image

Class 'View' not found in ?

How to set default?

tks!

duncan3dc commented 4 years ago

Hi @hoangnamitc, I think you want to use the @include directive, something like:

@yield('body', @include('includes.body'))

Does that do what you're trying to achieve?

hoangnamitc commented 4 years ago

Thanks Pro!

hoangnamitc commented 4 years ago

hi @duncan3dc ,

I trying take your way, but return null ?

image