14.2. CREATING YOUR OWN APPLICATION STRUCTURE 401
'urlManager'
//
],
'urlManagerFrontend
//
],
],
];
After it is done, you can get an URL pointing to frontend like the following:
echo
14.2 Creating your own Application structure
Note: This section is under development.
While the basic and advanced application templates are great for most of
your needs, you may want to create your own application template with
which to start your projects.
Application templates in Yii are simply repositories containing acomposer
.jsonle, and registered as a Composer package. Any repository can be
identied as a Composer package, making it installable viacreate-project
Composer command.
Since it's a bit too much to start building your entire template from
scratch, it is better to use one of the built-in templates as a base. Let's use
the basic template here.
14.2.1 Clone the Basic Template
The rst step is to clone the basic Yii template's Git repository:
git clone
[email protected]:yiisoft/yii2-app-basic.git
Then wait for the repository to be downloaded to your computer. Since the
changes made to the template won't be pushed back, you can delete the.git
diretory and all of its contents from the download.
14.2.2 Modify the Files
Next, you'll want to modify thecomposer.jsonto reect your template. Change
thename,description,keywords,homepage,license, andsupportvalues to de-
scribe your new template. Also adjust therequire,require-dev,suggest, and
other options to match your template's requirements.
Note: In thecomposer.jsonle, use thewritableparameter under
extrato specify per le permissions to be set after an application
is created using the template.