Ship Packages Faster. Keep Architecture Consistent.
Laravel Package Core is the shared foundation behind JobMetric Laravel packages. Stop retyping the same provider wiring, CRUD scaffolding, and response boilerplate in every package and start building domain features with a single, opinionated toolkit. It provides a robust and flexible layer for package bootstrapping, container registration, reusable service patterns, dynamic model relations, resource resolution, and predictable HTTP and service responses—giving you the same structural conventions across packages without sacrificing clarity. This is where serious package development meets developer-friendly consistency—so every new package feels familiar to your team and to integrators.
Configure what your package registers and publishes—config, migrations, routes, translations, views, assets, commands, and bindings—through one provider-oriented flow instead of scattering ad hoc mergeConfigFrom, loadMigrationsFrom, and publishes calls across custom providers.
Model domain services with query support, lifecycle hooks, event dispatching, and standardized response contracts using AbstractCrudService, matching patterns already proven in packages like Flow.
Register relations at runtime with HasDynamicRelations so host applications can extend package models without maintaining forks or editing vendor classes.
Resolve context-aware resources with ResourceResolveEvent and attach morph-based dynamic attributes with HasMorphResourceAttributes for flexible APIs and admin experiences.
Keep response shapes consistent with Output\Response and Controllers\HasResponse, reducing bespoke array payloads duplicated across controllers and services.
Use console scaffolding helpers, enum-oriented utilities, boolean status helpers, and global helper functions aligned with other JobMetric packages.
Laravel Package Core is the structural glue for multi-package Laravel ecosystems: it standardizes how packages boot, bind services, publish assets, implement CRUD-style services, and return structured results.
In a typical Laravel monorepo or suite of first-party packages, teams often repeat the same infrastructure work in every provider and service. Laravel Package Core takes a different approach:
- One bootstrap vocabulary: Register package capabilities through shared provider patterns instead of one-off copies in each package
- Shared CRUD conventions: Query, hooks, events, and response contracts through
AbstractCrudService - Runtime-safe extensibility: Attach relations and resolve resources without rewriting package internals
- Consistent responses: Traits and value objects that keep controllers and domain services speaking the same language
- Cross-package helpers: Small utilities and console helpers that behave the same wherever they appear
Consider a domain package that ships migrations, config, routes, and a service consumed by host apps, while still allowing integrators to attach extra relations to your Eloquent models. With Laravel Package Core, you wire bootstrap concerns once, expose predictable service and HTTP responses, and let applications extend models at runtime. The power of a shared core lies not only in saving lines of code but also in making every package easier to onboard, review, and evolve.
By adopting Laravel Package Core, you will:
- Bootstrap packages consistently - One pattern for config, routes, migrations, translations, and bindings
- Reduce duplicated infrastructure - Shared helpers, traits, and base services instead of copy-paste providers
- Extend packages safely - Dynamic relations and resource resolution without editing vendor models
- Align responses everywhere - Predictable shapes for controllers and domain services
- Move faster on new packages - Spend time on domain logic, not repeated wiring
- Maintain clean code - Conventions that mirror other JobMetric packages your team already uses
Install Laravel Package Core via Composer:
composer require jobmetric/laravel-package-coreReady to transform your Laravel applications? Our comprehensive documentation is your gateway to mastering Laravel Package Core:
The documentation includes:
- Getting Started - Quick introduction and how the package fits the ecosystem
- Installation - Requirements and Composer setup
- Showcase - Real-world wiring from projects that already depend on this foundation
- Package Core Service Provider - Bootstrap capabilities, registration, and publishable resources
- Abstract CRUD Service - Domain services, queries, hooks, events, and responses
- Dynamic Relations and Resources -
HasDynamicRelations,ResourceResolveEvent, and morph resource attributes - Controllers and Responses -
HasResponseand structuredOutput\Responseusage - Utilities - Helpers, console tools, enum patterns, and boolean status helpers
Thank you for participating in laravel-package-core. A contribution guide can be found here.
The laravel-package-core is open-sourced software licensed under the MIT license. See License File for more information.