Autoloading in bedrock

I am using bedrock for the first time and I have setup a child theme in it. I want to know how to add a class in the theme so it is autoloaded just like how the rest of bedrock is working.

1 Like
  1. set up composer autoloads in your child theme
  2. require the composer autoloader in your child theme, example:

Note: This is unrelated to bedrock. You can use this technique on non-bedrock projects.

See also:


Thanks :slight_smile:

This topic was automatically closed after 42 days. New replies are no longer allowed.