Directory Structure Analysis

One, App comprises Controller, Model, route, etc., directory applications, most of the operations in the directory will be
(1) Console command line program directories
Commands contains the classes used for command execution can be customized in the directory class
Kernel.php command calls the kernel file that contains commands variable (command list, the command must be added to the custom here) method and schedule (for task scheduling, that scheduled task)
events event listings
(2) Exceptions include custom error and exception handling class
(3) http hTTP transport layer related class catalog
controllers directory controller
middleware middleware directory
requests request class catalog
kernel file contains http Kernel.php middleware and middleware routing
routes.php robust routing
Jobs the directory tasks included under the category queue
 listeners listener directory
providers directory service provider
 model instance User.php comes, our new model is also stored in the default directory
two, Bootstrap framework boot loader directory
 app.php create a framework for application examples
 autoload.php automatically loads the
 cache storage start caching framework, web server needs to have write access to the directory
three, Config various configuration files directory
 app.php system-wide configuration files
 auth.php user authentication configuration file, specify the table and a good model can easily use the authentication function
 broadcasting.php event broadcast configuration file
 cache.php Cache profile
 compile.php compiled class files and need extra configuration files, the average user rarely used
 database.php database configuration file
 filesystems.php file system configuration files, cloud storage where you can configure the parameters
 mail.php e-mail profile
 queue. php message queue configuration file
 services.php third-party service may be stored configuration information
 storage session.php configuration session, the life cycle of information
 view.php template file configuration file that contains the template directory and build directories, etc.
four, Database relevant directory database
(1) new factories 5.1 or higher characteristics, factory class directory which is data used to populate
 ModelFactory.php Model filled define the desired different types of data file
  (2) migrations migration file storage database
( 3) seeds storage directory data to populate the class
 DatabaseSeeder.php execute php artisan db: seed command will invoke the run method of the class. The method may perform other call Seeder classes in the directory, factories can call a method for generating a data model defined in ModelFactory
Fives, Public web portal, ip or domain name should point to that directory instead of the root directory. For external access css, js and pictures and other resources are placed here
(1) index.php file entry
(2) .htaccess Apache server with a URL rewrite the file
(3) web.config IIS server with the file overwriting URL
six, Resources resource file directory
(1) assets can be stored contain LESS, SASS, CoffeeScript, including the original resource files
(2) lang localization file directory
(3) views views on this matter on file
Seven, Storage storage directory. web server needs to have write access to the directory and all subdirectories
(1) app may be used in some applications required to store the file
(2) the catalog view framework includes a file cache, sessions, and a compiled
(3) logs Log table of Contents
Eight, Tests Test Directory
nine, Vendor Laravel This directory contains the source code and the third party dependencies
.env environment configuration files. configuration files in the config directory will use the file inside the parameters, different production environments using different .env file.
artisan powerful command line interface, you can write custom command in App / Console / Commands
composer.json stored file dependencies
composer.lock lock file dependencies while holding the installation version of the truth
(a kind of front-end gulpfile.js gulp build tool) configuration file
package.json gulp profile
phpspec.yml phpspec (one kind of test PHP framework) profile
phpunit.xml phpunit (one kind of test PHP framework) profile
server.php PHP built-in Web server will refer to this document as Entrance. To public / index.php to the entrance of the file can be ignored

Published 31 original articles · won praise 1 · views 292

Guess you like

Origin blog.csdn.net/qq_45844654/article/details/105191486