简体   繁体   English

开发项目时Laravel中文件结构如何出现

[英]How file structure comes in Laravel when developing a project

I have been suffering from this problem for several months now. 我已经困扰这个问题好几个月了。 There are lot of tutorials explain about how to implement your code using OOP methods. 有很多教程解释了如何使用OOP方法实现代码。 With parent classes, abstract classes, Interfaces etc. 带有父类,抽象类,接口等。

My problem is where should I create such file structure in frameworks as Codeigniter, Laravel etc. I know only controller folder to define classes. 我的问题是我应该在诸如Codeigniter,Laravel等框架中的何处创建此类文件结构。我只知道用于定义类的控制器文件夹。 Should I place all the interfaces and parent classes in controller folder? 是否应将所有接口和父类放在控制器文件夹中? Please explain it's really mess for me. 请解释一下,对我来说真的很烂。

This tutorial helped me understand where to put my own libraries. 本教程帮助我了解将自己的库放在哪里。 Give it a shot! 试一试!

In Laravel 4, the file structure already exists in your /app folder. 在Laravel 4中,文件结构已经存在于/ app文件夹中。

See: http://laravelbook.com/laravel-architecture/ 请参阅: http//laravelbook.com/laravel-architecture/

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM