/ tinkerware

How to Use Yii2 Advanced with MyDevOp in 6 quick steps.

Set up a Yii2 Project in 5 minutes Local+Staging Environments.
When you're done, access the root link / and /admin to see the magic.

General steps

  1. Once you logged in, click on the Create New Project Button.

Create Project

  1. Type the name for your new project to identify it.

Project Name

  1. Enable the Yii2Advanced AddOn

Yii2Advanced

For a brand new project

  1. Go to the final steps

Using your Github Code.

  1. Connect your Guthub Account and Select your Yii2Advanced Repository.

Github

  1. Add the following lines to your backend/config/main.php or see if you have them already...
<?php

return [
    'homeUrl' => '/admin',
    'components' => [
        'request' => [
            'baseUrl' => '/admin',
        ],
        'urlManager' => [
            'enablePrettyUrl' => true,
            'showScriptName' => false,
        ],
    ],
];

And to frontend/config/main.php

<?php

return [
    'homeUrl' => '/',
    'components' => [
        'request' => [
            'baseUrl' => '',
        ],
        'urlManager' => [
            'enablePrettyUrl' => true,
            'showScriptName' => false,
        ],
    ],
];
  1. Go to final steps.

Final steps

  1. Click on "Create Project" at the bottom

  1. On the Project page, click Deploy to see the project live on your new Staging Environment. It'll take around 3 mins to finish the setup and you'll get the IP for your Env.

  2. Download your local environment. You can use our CLI as well.

Options

Environments

Deployed

From the CLI

CLI

That's it! Go ahead throwing tons of lines of code!
You should see this on your Staging server and on 192.168.33.10 locally.

and on /admin

Check our guide on "Local+Stage Sync on 3 steps" to sync Local and Staging Envs!.

Troublshooting.

Compatibility.

If you are using a custom Yii2Advanced repository, make sure to follow the Recommended Structure for a Yii2Advanced Project in order to have a clean Deploy and Local Environment.