The MetaFox directory structure extends the Laravel framework directory structure. Please read laravel directory structure for more details.
app/ : Contains the core code of laravel frameworkbootstrap/ : Laravel default, don't changeapp.php :cache/ : Contains framework generated files for performance optimization such as the route and services cache files.config/ : Contains root of your application's configuration files.database/ : Contains root database migrations, model factories, and seeds.packages/ : All MetaFox packagesmetafox/ : Contains MetaFox core packagesplatform/ : Contains MetaFox framework code.public/ : Laravel defaults.htaccessrobot.txtindex.php : Entry point for all requestsresources/ : Laravel defaultroutes/ : Laravel defaultstorage/ : Laravel defaultlogs/ : Contains your file based logs filesapp/public/ : Contains users uploaded filestests/ : Contains root automated testsvendor/ : Contains your Composer dependencies.
Now, we'll look into directories deeper
app directory contains the core code of Laravel framework. You should not change this source code to keep your application is upgradable.
bootstrap directory contains the
app.php file which bootstraps the framework. This directory also has a
cache directory which contains generated files for performance optimization such as the route and services cache files. You don't need to modify any files within this directory.
config directory contains root of your application's configuration files. It's a great idea to read through all of configuration files and familiarize yourself with all of the available options.
database directory contains root database migrations, model factories, and seeds. Also, you can use this directory to hold an SQLite database.
public directory contains the
routes directory contains root of the route definitions for your application. By default, several route files are included with Laravel, such as:
web.php file contains routes that the
RouteServiceProvider places in the web middleware group, which provides session state, CSRF protection, and cookie encryption. If your application does not support stateless RESTful API then it is likely that all of your routes will most likely be defined in the
api.php file contains routes that the
RouteServiceProvider places in the API middleware group. These routes are intended to be stateless, so requests entering the application through these routes need to be authenticated via tokens and will not have access to session state.
console.php file is where you may define all of your closure based console commands. Each closure is bounded to a
command instance allowing a simple approach to interact with each command's IO methods. Even though this file does not define HTTP routes, it defines console based entrypoints (routes) into your application.
channels.php file is where you may register all of the event broadcasting channels that your application supports.
/storage directory contains your logs, file based sessions, file caches, and other files generated by the framework. This directory is segregated into
logs directories. The
app directory may be used to store any files generated by your application. The
framework directory is used to store framework generated files and caches. Finally, the
logs directory contains your application's log files.
storage/app/public directory may be used to store user-generated files, such as profile avatars, that should be publicly accessible. You should create a symbolic link at
public/storage which points to this directory. You may create the link using the
php artisan storage:link Artisan command.
/tests directory contains root automated tests. Example PHPUnit unit tests and feature tests are provided out of the box. Each test class should be suffixed with
Test. You may run your tests using the
php vendor/bin/phpunit commands. Or, if you would like a more detailed and beautiful representation of your test results, you may run your tests using the
php artisan test Artisan command.
vendor directory contains your Composer dependencies.