Blogger Information
Blog 9
fans 0
comment 0
visits 7496
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
laravel目录结构
高杰
Original
779 people have browsed it

laravel目录里边主要需要注意的目录和文件如下:

app目录:app/Http/Controllers为控制器目录,目录下的user.php为model目录;

config目录:配置目录,更改时区在app.php文件内;

public目录:域名需要指向的目录;

resources目录:resources/views为视图目录,视图的后缀为.blade.php;

routes目录:路由目录,主要的路由配置都在web.php里;

.env为配置文件:数据库配置在这个文件里;

artisan文件可以执行某些快速操作,如快速生成控制器文件和目录,具体操作如下:

php artisan make:controller Admin/Article;

执行这个命令后,会在app/Http/Controllers目录下先生成Admin目录,然后再它的下边生成Article.php控制器文件


Correcting teacher:WJWJ

Correction status:qualified

Teacher's comments:写的不错,认真!
Statement of this Website
The copyright of this blog article belongs to the blogger. Please specify the address when reprinting! If there is any infringement or violation of the law, please contact admin@php.cn Report processing!
All comments Speak rationally on civilized internet, please comply with News Comment Service Agreement
0 comments
Author's latest blog post