Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Common Laravel Package

lbhurtado/common

A Laravel utility package offering shared helpers, traits, value objects, and base classes for common application needs. It reduces boilerplate with reusable models, enums, casts, and support utilities for faster, consistent development.

Deep Wiki
Context7

lbhurtado/common provides a lightweight set of shared utilities for Laravel and PHP applications, centralizing reusable helpers, traits, and conventions so packages and projects stay consistent. It is designed as a foundation package for other lbhurtado components, reducing duplication and simplifying common application concerns.

  • Reusable PHP helpers and utility functions
  • Shared Laravel traits and service-provider conventions
  • Consistent configuration and package bootstrapping
  • Composable building blocks for application layers
  • Simple, framework-friendly integration with minimal overhead
Frequently asked questions about Common
What is lbhurtado/common used for?
It is a utilities package that collects shared building blocks such as common traits, base models, helpers, and coding conventions. It is primarily the shared foundation for the lbhurtado/missive, lbhurtado/sms, lbhurtado/tactician, and lbhurtado/engagespak packages. You can also use it directly in your own Laravel application to standardize recurring patterns and reduce boilerplate.
How do I install lbhurtado/common?
Install it with Composer using composer require lbhurtado/common. In many cases it will already be pulled in transitively when you install one of the sibling lbhurtado packages that depend on it. Check the package's composer.json constraints before installing to confirm compatibility with your PHP and Laravel versions.
Which Laravel versions does lbhurtado/common support?
Support is defined by the illuminate and PHP version constraints declared in the package's composer.json rather than by the overview text. Because the public repository is not clearly listed, verify the current constraints on its Packagist page before upgrading Laravel. Running composer why-not lbhurtado/common after an upgrade is a quick way to surface conflicts.
Is lbhurtado/common a standalone package or a dependency of other packages?
It is best understood as a support library: it exists mainly so the lbhurtado family of packages can share traits, base classes, and helpers instead of duplicating them. You can depend on it alone if you only want those shared utilities. Its value is greatest when used alongside the sibling packages it was extracted for.
Do I need to publish configuration files or run migrations after installing it?
The package is described as a collection of traits, base models, helpers, and conventions, which usually means no mandatory configuration step. There is no README documentation provided here, so confirm whether a service provider or publishable assets exist by inspecting the package source after installation. If your own models extend its base models, check whether those base classes expect specific table or key conventions.
How do I use the common traits and base models in my application?
Import the traits with standard use statements inside your classes, and extend the provided base models where their conventions fit your domain. The package is intended to enforce consistency, so read the trait and base class source before adopting them so you know which methods and properties they expect. Avoid extending a base model if your existing model already has conflicting behavior.
Can I use lbhurtado/common outside of Laravel or in a plain PHP project?
It is described as a Laravel utility package, so some helpers and base models will assume Laravel components such as Eloquent or the service container. Individual helper functions may be framework agnostic, but there is no documented guarantee of that. For non-Laravel projects, check the dependencies in composer.json before relying on it.
How should I test an application that depends on lbhurtado/common?
Write normal PHPUnit or Pest tests for your own classes and assert the behavior you rely on from the inherited traits and base models. Because these are shared components used across several packages, integration tests that exercise the database and container are more valuable than isolated unit tests. Pin the version in composer.lock so test results stay reproducible across environments.
Is lbhurtado/common safe to use in production?
It is a small utility package of traits, base models, and helpers rather than a system that handles security-sensitive flows on its own. The main risks are maintenance and visibility, since the public repository is not clearly identified and the package appears maintained by a single author. Review the source, pin a specific version in composer.lock, and keep an eye on releases before relying on it in critical applications.
What are good alternatives to lbhurtado/common?
If you only need helper functions, the illuminate/support component and Laravel's built-in helpers cover most cases. For reusable base classes and package scaffolding, packages such as spatie/laravel-package-tools or a small in-house abstract model and trait set are common alternatives. Many teams ultimately replace utility packages like this with their own internal shared library once the patterns stabilize.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
shitoudev/permissionmanager
johannesclimacus/laravel-tui
hocvt/seotools
vitalybaev/sypexgeo
amphibee/themosis-ignition
gito-me/fast-excel
frankyso/laravel-ipaymu
geolize-studio/laravel-chile
boomerangui/chat
jinas/dhivatar
store-doc/laravel-storage-driver
plus-it/laravel-translation-manager
diephp/perhaps
diephp/telegraph
osmaviation/spreadsheet
microsoft/fluentui-system-icons
mmccook/php-json-canonicalization-scheme
middlewares/firewall
qubiqx/montapacking
nyoncode/laravel-package-console