Skip to content

Latest commit

 

History

History
109 lines (82 loc) · 3.41 KB

README.md

File metadata and controls

109 lines (82 loc) · 3.41 KB

Bones documentation

Installation

It is recommended to install a supported Bones project to help you get started.

For manual installation instructions, see manual installation.

File structure

The file structure for a Bones application is as follows:

/app
  /Controllers
  /Console/Commands
  /Events
  /Exceptions
  /Filters
  /Migrations
  /Models
  /Services
  /Utilities
/config
  /app.php
/public
  /storage
  .htaccess
  index.php
/resources
  bootstrap.php
/storage
  /app
  /bones
  /public
.env
  • /app - All of your app's namespaced classes reside here.
  • /app/Migrations - Optional location of any database migrations.
  • /config - All of your app's configuration files reside here.
  • /public - Public web root of the application.
  • /public/storage - Symlink to /storage/public.
  • /resources - All of your app's resources reside here. These include the bootstrap.php file, as well as any resources you wish to add such as views, translations, or other utilities.
  • /storage - All locally stored files reside here. This includes files written by the app, written by Bones, publicly shared files, and any other files you wish to store.
  • .env - All environment variables are saved here. This file should never be made public or committed to your application's source control.

Configuration

General application configuration is done via config files in the /config directory. These files typically return an array.

The required configuration files are:

Additional configuration files may be needed depending on which services you use. You may also add your own configuration files as desired.

Config files can use the getEnv app utility to retrieve environment variables. The getConfig app utility can be used to retrieve config values throughout your app.

Because the configuration files are typically committed to your application's source control, they should never contain sensitive information such as account credentials.

Usage

Services

Bones will automatically place the following services into the container:

Depending on your installation configuration, Bones may use these place additional services into the container:

Other commonly used helpful services you may wish to bootstrap into your app include:

  • Multi-Filesystem: An easy-to-use library used to manage multiple Flysystem adapters from a single class.
  • Multi-Logger: An easy-to-use library used to manage multiple Monolog channels from a single class.

The following services are included with Bones:

  • None.

Utilities