Php Laravel 4中的模块

Php Laravel 4中的模块,php,laravel,laravel-4,Php,Laravel,Laravel 4,在L3中,我设法制作了一个模块系统,在该系统中,我能够从管理区域安装/卸载模块 if(!Bundle::exists($name)) { // Load the bundle // If a routes file exists then we'll assume it handles routes of it's own name. // Remember, if you need it to handle a custom route

在L3中,我设法制作了一个模块系统,在该系统中,我能够从管理区域安装/卸载模块

if(!Bundle::exists($name))
    {
        // Load the bundle
        // If a routes file exists then we'll assume it handles routes of it's own name.
        // Remember, if you need it to handle a custom route you should manually add
        // the bundle in application/bundles.php.
        Bundle::register($name, array(
                'handles'   => File::exists($path.DS.'routes.php') ? $name : null,
                'location'  => 'path: '.$path,
                'auto'      => true)
        );

        // autobundle is already in the loop that's starting bundles so we
        // can't let the normal mechanism start it. We'll start it here.
        Bundle::start($name);
    }

在L4我怎么能做到?L4对我来说,它看起来非常不同,我在2个月前开始使用L3(第一个框架)

捆绑包现在是包,实际上是可重用PHP代码的库,存储在不同的位置,并由索引(可安装)


为了进行基于Laravel的软件包开发,您需要查看以下文档:这应该会对您有所帮助。

bundle现在是软件包,实际上是存储在不同位置的可重用PHP代码库,并通过(可安装)索引


为了进行基于Laravel的软件包开发,您需要查阅以下文档:这些文档应该会对您有所帮助。

或者,如果您仍然需要更特定于应用程序的模块,您可以通过以下网址查阅我的教程:


我将很快展开这篇文章,解释如何构建一个简单的界面来激活/停用这些模块。

或者,如果您仍然想要更特定于应用程序的模块,您可以通过以下网址查看我的教程:


我将很快扩展这篇文章,解释如何构建一个简单的界面来激活/停用这些模块。

我不能给你完整的说明,所以我不会编写一个答案,但“bundle”现在被称为“packages”。我从未使用过composer,laravel 3是我尝试的第一个框架。在Laravel4中,我找不到启动/停止“包”的方法。我无法给您完整的说明,因此我不会编写答案,但“包”现在称为“包”。我从未使用过composer,Laravel3是我尝试的第一个框架。在laravel 4中,我找不到启动/停止“软件包”的方法。这篇文章很棒,如果你能发布如何激活/停用软件包,这篇文章会很棒;如果你能发布如何激活/停用软件包,这篇文章会很棒