Skip to main content

Build Better Laravel Packages, Faster.

Laravel Package Core is a practical toolkit for package authors. Instead of rewriting common infrastructure in every package, you get a ready foundation for provider bootstrapping, reusable model traits, dynamic resource resolution, and standardized CRUD services.

Why Laravel Package Core?​

One Foundation, Many Packages​

This package is designed to be the base layer for other Laravel packages. You can standardize the setup process, reduce duplication, and keep your package ecosystem consistent.

Production-Ready Building Blocks​

From helper functions and enum macros to dynamic morph resources and CRUD service patterns, each component solves a repeated real-world problem in package development.

Better Maintainability​

The provided abstractions reduce boilerplate and encourage a cleaner architecture. This improves readability and long-term maintenance across teams and projects.

What is Inside?​

  • PackageCoreServiceProvider: fluent package registration (config, routes, migrations, views, assets, commands, container bindings)
  • EnumMacros: utility methods for enum-like access patterns
  • ConsoleTools: helpers for stub processing and file generation
  • helpers.php: shared runtime utility functions
  • HasBooleanStatus: model scopes for boolean status
  • HasDynamicRelations: register runtime relationships without changing package code
  • ResourceResolveEvent: global event to resolve resource representation by subject/context
  • HasMorphResourceAttributes: dynamic <relation>_resource attributes for MorphTo relations
  • AbstractCrudService: reusable CRUD service with hooks, events, resources, and responses

Who Should Use This Package?​

  • Laravel package authors who maintain multiple packages
  • Teams that want consistent package architecture
  • Developers who need reusable CRUD and resource patterns
  • Projects that rely heavily on polymorphic relations

Documentation Path​

  1. Read Installation
  2. Review practical examples in Showcase
  3. Dive into complete API references in the Deep Diving section

Quick Jump​