How to change path to src dir?

I want to move src to another folder, how to change path to it?
ps changing paths.php has no result., appication uses default folder

You’d need to change it in Composer’s autoloader and composer.json too… but the question is “why would you?”

What @FinlayDaG33k said. Life is much easier if you follow the conventions. Otherwise, every time you bake things you probably need to move them around, it might be looking in the wrong spots for assets, could get in the way of unit testing, …

1 Like

I need to make some sites with the same src but with different databases. May be you can suggest another dissision of this problem?

Create multiple datasource configurations in your app.php. Select which one to use based on something you define in the index.php before calling into the Cake code.

can you show example please?

In a.example.com’s index.php, before where requirements.php is included:

define('SUBDOMAIN', 'a');

In b.example.com, you define it to ‘b’.

In app.php:

switch (SUBDOMAIN) {
    case 'a':
        $database = 'a_database';
        break;
    case 'b':
        $database = 'b_database';
        break;
}

Then later in your Datasources config:

'database' => $database

If you need to change user name, password, host, etc., just initialize and use some more variables.