如何在Laravel 4中使用子应用程序构建平台? [英] How to structure a platform with sub apps in Laravel 4?

查看:128
本文介绍了如何在Laravel 4中使用子应用程序构建平台?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要开发几个具有共同特征和流程的网站,唯一会发生巨大变化的是CSS,即使是HTML也是常见的。



m在Laravel 4中组装这个结构时遇到了麻烦,因为我仍然是框架中的一个开始。




  • 我需要一个超级项目,所有子项目将继承。

  • 我需要能够在特定的子项目中实现自定义功能和流程。
  • 我需要将它自己的GIT存储库中的每个项目分开。



我希望对已经有人有意见不得不创建这样的结构。



预先感谢! 您可以使用软件包功能,首先需要将内核软件包作为基本项目,然后扩展'你的git仓库的'子项目',它是简单的方法,正如Laravel的介绍所说:


软件包可能是一种很棒的方式来处理碳日期或整个BDD测试框架,如Behat。


使用套件,您可以在 composer.json 并逐一加载它们。


I need to develop several websites with common features and flows, the only thing that will dramatically change is the CSS, even the HTML will be common.

I'm having troubles to assemble this structure in Laravel 4, since I'm still a begginer at the framework.

  • I need to have a "super project" that all "sub projects" will inherit from.
  • I need to be able to implement custom features and flows in a specific "sub project".
  • I need to separate every project in it's own GIT repository.

I would love to have an opinion of someone who already had to create such structure.

Thanks in advance!

解决方案

You can use package feature, first of all you need to make a kernel package as your basic project and then extends 'sub projects' from your git repository, it's easy way, as Laravel introduction says:

"Packages might be anything from a great way to work with dates like Carbon, or an entire BDD testing framework like Behat."

With packages you can single out each feature on composer.json and load them one by one.

这篇关于如何在Laravel 4中使用子应用程序构建平台?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆