# Path Config

leaf API v3 comes in with a whole lot of available customizations. One major customization is the paths config. This allows you to change leaf API's directory structure to something you prefer. This means you can rearrange the whole of leaf API and have all your files still map correctly: a feature which was only available in skeleton.

<?php

return [
    'controllersPath' => 'app/controllers',

    'modelsPath' => 'app/models',

    'migrationsPath' => 'app/database/migrations',

    'seedsPath' => 'app/database/seeds',

    'factoriesPath' => 'app/database/factories',

    'helpersPath' => 'app/helpers',

    'viewsPath' => 'app/views',

    'configPath' => 'config',

    'storagePath' => 'storage',

    'commandsPath' => 'app/console',

    'routesPath' => 'app/routes',

    'libPath' => 'lib',

    'publicPath' => 'public',

    'databaseStoragePath' => 'storage/app/db'
];
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31

These defined paths become available through global shortcut functions like viewsPath()

# Next Steps