Home > PHP Framework > Laravel > body text

What directories are included in the laravel project

青灯夜游
Release: 2023-01-13 00:40:30
Original
3467 people have browsed it

The directories included are: 1. app directory; 2. bootstrap directory; 3. config directory; 4. database directory; 5. public directory; 6. resources directory; 7. routes directory; 8. storage directory ;9. Vendor directory, etc.

What directories are included in the laravel project

The operating environment of this tutorial: Windows 7 system, Laravel version 5, Dell G3 computer.

Directories included in the laravel project

What directories are included in the laravel project

The app directory is the core directory of the project, mainly used to store core code, including controllers and models, where

What directories are included in the laravel project

  • User.php is the default model file
  • The model can also be managed in separate directories

What directories are included in the laravel project

  • Under this path is the controller, where Controller.php is the base class (parent class) controller

  • Auth is the default user authentication controller provided by the system

  • The controller can be managed in separate directories

##bootstrap directory

is the startup directory of laravel

What directories are included in the laravel project

config directory


What directories are included in the laravel project

##app.php is the main configuration file of the project
  • auth.php is the configuration file used to define user authentication (login)
  • database.php is the configuration file for the database
  • filesystems.php is the configuration needed to upload files and file storage The file
  • mail.php is the mail configuration file
  • session.php is the session control
  • view.php is the view
  • cache.php is the cache
database directory

What directories are included in the laravel project

When creating a table, it needs to be created through a PHP file. Class to create, that is, create a class in migrations. This file is also called a migration file (create a data table file)
  • The seeds file stores some data filling files for the data table
public directory

What directories are included in the laravel project

The entry file of the project (index.php) is placed in this file, which can be done A single entry file, in which the css and js files of later projects are placed in this directory.
  • Therefore, when configuring the virtual host, you need to specify the site directory under the public directory
resources directory

What directories are included in the laravel project

#The lang directory is the language pack (if the project needs to be localized, you need to configure the language pack)
  • views is the view directory, which is the view file storage Directory (view files can also be managed in sub-directories)
routes directory

is the directory where routes are defined, where web.php is where routes are defined document.

What directories are included in the laravel project

storage directory

The storage directory is the directory where cache files and log files are stored. If the files uploaded by the user are placed locally, It is also placed in storage.

What directories are included in the laravel project

    ##app
  • The file is to store the file uploaded by the user

  • framework
  • is the cache file when the framework is running

  • logs
  • is the log directory

  • vendor directory

Third-party content when stored

What directories are included in the laravel project.env file

is to set some system-related environment configuration file information


What directories are included in the laravel projectartisan file

is a scaffolding file, mainly used for generated code (automatic generation), such as automatically generating controller and model files. When using artisan, you must ensure that artisan is in the current working path of the command line. (No need to modify, just use it).

Related recommendations: The latest five Laravel video tutorials

The above is the detailed content of What directories are included in the laravel project. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template