The app
directory contains the core code of your application. We'll explore this directory in more detail soon; however, almost all of the classes in your application will be in this directory.
The bootstrap
directory contains the app.php
file which bootstraps Lychee. This directory also houses a cache
directory which contains framework generated files for performance optimization such as the route and services cache files.
The config
directory, as the name implies, contains all of Lychee's configuration files. It's a great idea to read through all of these files and familiarize yourself with all of the options available to you.
The database
directory contains your database migrations, model factories, and seeds. If you wish, you may also use this directory to hold an SQLite database.
The public
directory contains the index.php
file, which is the entry point for all requests entering Lychee and configures autoloading.
The resources
directory contains your views.
The routes
directory contains all of the route definitions for Lychee. Several route files are included with Lychee: admin.php
, web.php
, api.php
, console.php
and channels.php
. We only use the first two.
The web.php
file contains routes that the RouteServiceProvider
places in the web
middleware group, which provides session state, CSRF protection, and cookie encryption.
The admin.php
file contains routes with the same requirement as in web.php
while adding an admin middleware to protect them.
The storage
directory contains your compiled Blade templates, file based sessions, file caches, and other files generated by the framework. This directory is segregated into app
, framework
, and 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 Laravel's log files (useful in case of hard crash).
The tests
directory contains your automated tests. An example PHPUnit test is provided out of the box. Each test class should be suffixed with the word Test
. You may run your tests using the commands: make test
, phpunit
or php vendor/bin/phpunit
commands.
{note} This directory is not provided in the release zip file in order to reduce the size of the archive.
vendor
DirectoryThe vendor
directory contains your Composer dependencies.
{tip} While this directory is not provided if you use git to manage your Lychee installation, we provide it in the release wip file.
The majority of Lychee is housed in the app
directory. By default, this directory is namespaced under App
and is autoloaded by Composer using the PSR-4 autoloading standard.
The app
directory contains a variety of additional directories such as Console
, Http
, and Providers
. Think of the Console
and Http
directories as providing an API into the core of your application. The HTTP protocol and CLI are both mechanisms to interact with Lychee, but do not actually contain application logic. In other words, they are two ways of issuing commands to Lychee. The Console
directory contains all of the Artisan commands, while the Http
directory contains your controllers, middleware, and requests.
The Console
directory contains all of the custom Artisan commands for Lychee. These commands may be generated using the make:command
command.
The ControllerFunctions
directory houses some of the Logic of Lychee. It currently is dedicated to the Installation and Update process. It should hold more logic in the future.
The Exceptions
directory contains Lychee's exception handler. If you would like to customize how your exceptions are logged or rendered, you should modify the Handler class in this directory.
The Http
directory contains your controllers, middleware, and form requests. Almost all of the logic to handle requests entering your application will be placed in this directory.
It currently houses some logic which should be refactored away.
The Image
directory contains our image handler. We provide here two ways to manipulate pictures:
The Locale
directory contains at the moment all the translations strings for Lychee. This inhouse solution needs to be refactored to follow a better design.
The Metatdata
directory contains logic related to data such as Exif information, geodecoding, lychee version, GitHub monitoring...
The ModelFunctions
directory contains logic related to the models. This aims to improve interaction between models without clustering their files with logic.
The Providers
directory contains all of the service providers for Lychee. Service providers bootstrap Lychee by binding services in the service container, registering events, or performing any other tasks to prepare your application for incoming requests.
The Redirection
directory houses main redirection to handle the installation (database not set) and safety cases (security key not set).
{tip} Caught a mistake or want to contribute to the documentation? Edit this page on Github!