I know you can pass data to a partial but I’m a little confused how to access it. I want to be able to add a class based on where my partial will be used, so for example, it would look something like this if I was using it on a single post template:
@include('partials.services', ['class' => 'services-single'])
and if I wanted to include the partial on the home page, I could do:
@include('partials.services', ['class' => 'home'])
And then in the Services partial template, I want add that class in the first line to look like this:
<section class="INSERT THAT CLASS HERE">...</section>
I tried reading the Laravel Blade docs but I’ve been coming up short. Any ideas?