Using the code editor of your preference, navigate to the Plugins folder and create a new folder domain-core. The domain-core folder will contain all our plugin files.
We will create the following files and folder at the root level of the plugin folder.
You need to start with these files at the plugin’s root level directory. We will discuss the folder and file contents in the next topic. First, let’s go into the core directory and add more files and directories we will use in our plugin.
Inside the core folder, we need to create the following;
The create the following files inside the Base folder.
In the Admin folder, -we will create the ReusableBlock.php. This is where we will be adding the reusable block functionality for them to appear on the Admin menu.
The plugin Github repo has some files and folders that we have not created in the steps above. We will look at how these are created in the following topics.
Overall file structure
At the end of this topic, your file structure should look like this.
You must have noticed that all our file names and folders inside the “core” directory have names starting with capital letters. This is one of the requirements when using PSR-4. Thus, you should follow this standard.