简体   繁体   中英

Does anything like Rails Engine exist for Laravel?

Is there anything like Rails engines or similar for Laravel?

http://guides.rubyonrails.org/engines.html

Essentially what I'm aiming for is to have a single app with little "child" laravel apps contained within it and still have the ability to use the parent code as much as possible but still be able to override anything in the context of the child.

Hope this makes sense

On searching a bit, I stumbled upon Laravel's package feature .

This question is already answered here on SO. It says, you need to make a kernel package as your basic project and then extend '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.

It's just like RoR's engine but obviously a different approach as they are two different frameworks.

Happy coding!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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