It is useful to add resource-specific classes to the body class of a page to allow elements to be targeted by CSS.
Pass Variable from Child View to Master Layout
Pass a relevant variable from the blade template:
You need to check that the variable is not empty - otherwise, if
$body_class isn’t passed in to the master template an error will occur.
In the child blade template:
In the master:
comments powered by Disqus