I have variable {{$template}}.. How can I do for including that variable to @extends. I had try like this:
@extends({{$template}}) // getting error
I hope, there is one answer to help me. Thanks.
you mean you want to pass the value for $template
to your layout? and from where you are getting the value of $template
?
If you want to pass the variable to layout
, then try doing
@extends('<<your layout name>>', ['template' => $template])
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With