6.4.1. Our Project’s Structure

These are the directories we are most interested in:

app

The main directory of our application. Models will be located in the root directory. The Http subdirectory contains everything that is related to working with the browser. The Http/Controllers subdirectory contains our controllers.

config

The directory with configuration files. You will discover more details about the configuration process later.

public

The root directory of the web application (DocumentRoot). It contains static files: css, js, images, etc.

resources

Contains views, localization files and, if any, LESS files, SASS and js applications on such frameworks as ReactJS, AngularJS or Ember that are later put together into the public folder with an external tool.

The root directory of our application contains the composer.json file that describes the packages our application will need besides those that are already present in Laravel.

We will need two such packages: zofe/rapyd-laravel for building a quick interface with grids and edit dialog boxes, and sim1984/laravel-firebird, an extension for working with Firebird databases.

The sim1984/laravel-firebird package is the author’s fork of the jacquestvanzuydam/laravel-firebird package. Its installation is a bit different. A description of how the package differs from the original is available in the article Package for working with the Firebird DBMS in Laravel if you can read Russian. An English-language description of the packages and the changes from the original can be found in the readme.md document at this URL: https://github.com/sim1984/laravel-firebird.

Caution

Remember to set the minimum-stability parameter to ‘dev’ because the package is not stable enough to publish at https://packagist.org. You will need to modify the composer.json file (see below) to add a reference to the gitHub repository.

In the file composer.json:

  1. "repositories": [
  2. {
  3. "type": "package",
  4. "package": {
  5. "version": "dev-master",
  6. "name": "sim1984/laravel-firebird",
  7. "source": {
  8. "url": "https://github.com/sim1984/laravel-firebird",
  9. "type": "git",
  10. "reference": "master"
  11. },
  12. "autoload": {
  13. "classmap": [""]
  14. }
  15. }
  16. }
  17. ],

Use the require section to add the required packages in the following way:

  1. "zofe/rapyd": "2.2.*",
  2. "sim1984/laravel-firebird": "dev-master"

Now you can start updating the packages with the following command, which must be started in the root directory of the web application:

  1. composer update

On completion of that command, the new packages will be installed in your application.