Laravel5.1 Directory Structure parsing

Source: Internet
Author: User

To learn a framework, the first thing to understand is the directory structure. The directory structure is clear, you can start to learn ~
This is not the introduction of new features, the right when the directory structure of the manual to see it. Please contact me if you find something wrong.
Note: The version is referenced when writing this article 5.1.4

directory or file Description
|– App A directory of applications including controller, Model, routing, etc., where most of the business will be
| |–console Command-line Program directory
| | | |–commands Contains classes for command-line execution, where you can customize the class
| | | |–kernel.php The command calls the kernel file, contains the commands variable (command manifest, the custom command needs to be added here) and the schedule method (for task scheduling, which is scheduled task)
| |–events Event Directory
| |–exceptions Contains custom error and exception handling classes
| |–http HTTP Transport Layer-related class directory
| | | |–controllers Controller Directory
| | | |–kernel.php Kernel files that contain HTTP middleware and routing middleware
| | | |–middleware Middleware Catalog
| | | |–requests Request Class Directory
| | | |–routes.php Powerful routing
| |–jobs The task class that contains the queue under this directory
| |–listeners Listener Directory
| |–providers Service Provider Directory
| |–user.php Our new model is also stored in this directory by default.
|– Artisan Powerful command-line interface, you can write custom commands under App/console/commands
|– Bootstrap Framework Startup Loading Directory
| |–app.php Create a Framework app instance
| |–autoload.php Auto Load
| |–cache Storage framework startup cache, Web server requires write access to the directory
|– Composer.json Files that store dependencies
|– Composer.lock Lock file, which holds the actual version of the package when installed
|– config Directory of various configuration files
| |–app.php System-level configuration files
| |–auth.php User identity authentication profile, specifying a good table and model can be easily used to authenticate the function
| |–broadcasting.php Event Broadcast configuration file
| |–cache.php Cache configuration File
| |–compile.php Compiling additional files and classes requires a configuration file that is rarely used by general users
| |–database.php Database configuration file
| |–filesystems.php File system configuration file, where you can configure cloud storage parameters
| |–mail.php e-mail configuration file
| |–queue.php Message Queuing configuration file
| |–services.php Configuration information that can hold third-party services
| |–session.php Configure the session storage, life cycle, and other information
| |–view.php Template file configuration file, including template directory and compile directory
|– Database Database related Directories
| |–factories New features of version 5.1, factory class catalogs, also for data filling
| | | |–modelfactory.php In this file you can define the type of data to be populated for different model
| |–migrations Storage Database Migration Files
| |–seeds directory where data fills the class
| |–databaseseeder.php Executing the php artisan db:seed command will invoke the run method of the class. The method can be called to execute other Seeder classes in that directory, or the factories method can be called to generate a data model defined in Modelfactory
|– . Env The environment configuration file. The configuration file under the Config directory uses the parameters in the file, and different production environments use different. env files.
|– gulpfile.js Gulp (a front-end build tool) configuration file
|– Package.json Gulp configuration file
|– phpspec.yml Phpspec (a PHP test framework) configuration file
|– Phpunit.xml PHPUnit (a PHP test framework) configuration file
|– Public Site portal, you should point the IP or domain name to the directory instead of the root directory. Resources such as CSS, JS, and pictures that can be accessed externally are placed here
| |–index.php Entry file
| |–.htaccess Apache server rewrites URLs with this file
| |–web.config The IIS server rewrites the URL with this file
|– Resources Resource file directory
| |–assets can store raw resource files including less, SASS, Coffeescript
| |–lang Localization Files directory
| |–views The view file is right here.
|– server.php PHP's built-in Web server will take this file as a portal. The file can be ignored with public/index.php as the entry
|– Storage Storage directory. The Web server needs to have write access to the directory and all subdirectories
| |–app Some of the files that you need to store your application? Pending additions
| |–framework This directory includes cached, sessions, and compiled view files
| |–logs Log directory
|– tests Test Catalog
|– Vendor This directory contains Laravel source code and third-party dependency packages

This article fixed link: http://zoufeng.me/2015/07/22/laravel5-1-dir-analysis/

Recommended a PHP Advanced Development Group (467634807), like watering and chatting do not enter ~

Laravel5.1 Directory Structure parsing

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.