简体   繁体   中英

Laravel: Working with a 3rd party bundle

This is a basic best practice question.

I started my first project using the Laravel framework. I just recently added the L4withSentry bundle to my laravel project. I followed the setup steps and everything is up and running fine, but I noticed that all of the code that's running for the site is running from the vendor folder of my project even though I published all of the views and assets.

Should I leave all of the code in the vendor folder and customize it there? I'm under the understanding that if I update composer and any of the vendor files need to be updated I'll lose all of my code. Should I move the controllers into my app folder?

packages should stay in the vendor folder. the sentry package makes it actually easy to customize or set your own model outside of sentry, so you don't have to fiddle with vendor packages.

if you really have to change some behaviour in a vendor package, you'd create a new class extending that vendor package's class.

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