Support the ongoing development of Laravel.io →
posted 4 months ago
Laravel

christophchi, goldenhub liked this thread

2

Copy & Paste

0

When it comes to reusing a Laravel codebase for new projects, there are several efficient ways to do so rather than simply copy-pasting code. Here are a few commonly used methods:

  1. Composer Packages: Consider converting reusable parts of your Laravel codebase into Composer packages. By creating separate packages, you can easily manage dependencies, versioning, and distribution. These packages can be published on Packagist or used within your organization.
  2. Custom Packages or Libraries: You can create your own custom packages or libraries within your Laravel application. These can encapsulate reusable logic, utilities, or functionality specific to your domain. This approach allows you to keep your codebase modular and maintainable.
Last updated by @tvbeek 4 months ago.
0

What is spacebar clickable ?

christophchi liked this reply

1
moderator

@designfellow that was spam and is now removed :)

christophchi liked this reply

1

actually it depends on your code, for me I like to use the service pattern, it's similar to the repository pattern, and it gives your the ability to take any needed service in other projects

0

Composer package method definitely the best

0

My self I use repository module driven .

abhigandhiabc liked this reply

1

Copy & Paste.

0

Sign in to participate in this thread!

Eventy

Your banner here too?

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.