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:
All @include('partials.services', ['class' => 'services-single']) does is make a variable available to that partial. If you want that in your class, you would need to echo the variable in your partial, i.e.: