Your project will always have the same basic structure. It may be made more complicated if needed, but most of the time this structure will be enough.
All your work should be done in the
folder. All references to file locations in this section will be within the src folder.
In the src folder, you should create a file called
, which will be the main entry point into your module (the Client Resource Group). There will only ever be one of these.
From this file, you will make reference to each Client Resource class. These should be stored in a folder called
. Each Resource should have a class called
Tests should be done in the
folder. All tests should extend
. Unit tests will be put in the Unit folder and feature tests in the Feature folder. Tests should be named after the class they test, appended with
We have yet to decide on the docs structure. It’ll use antora, but for now you are free to document however you want.
- src - Client.php // The main entry point - clients/ - FileClient.php // Used to access the file resource - CommentClient.php // Used to access the comments resource - models/ - File.php // Represents a file model - Comment.php // Represents a comment model - tests - TestCase.php - Unit - ClientTest.php - clients/ - FileClientTest.php - CommentClientTest.php - models/ - FileTest.php - CommentTest.php - Feature - ClientTest.php