p-marco/laravel_utils.entitiesmanager
Composer 安装命令:
composer require p-marco/laravel_utils.entitiesmanager
包简介
Opinionated package for laravel that organizes the entities by responsabilities.
README 文档
README
Simple opinionated utility to manage laravel entities.
What it does
laravel_utils-EntitiesManager is a Laravel package that simplifies the management of core data entities in your web application. It provides an opinionated and structured approach to efficiently handle entities, which are fundamental data objects such as users, products, or posts, and so on.
Key Features:
-
Streamlined Entity Management: This package streamlines the creation, organization, and management of entities in your Laravel application. It simplifies the process of setting up the essential components associated with each entity.
-
Clear Folder Structure: When generating an entity, laravel_utils-EntitiesManager creates a clear and consistent folder structure. For example, if you're working with a "Post" entity, it generates folders for controllers, models, providers, repositories, and views specific to that entity.
Post
Controllers
PostController.php
Models
PostModel.php
Providers
PostProvider.php
Repositories
PostRepository.php
Views
PostView.blade.php
-
This structured approach helps maintain a well-organized codebase.
-
Effortless Entity Generation: You can easily generate different components for an entity using simple artisan commands. For example, you can generate a model, controller, or repository for your entity with a single command, saving you time and effort.
// Example: Generate a model for the "Post" entity
artisan entity:generate Post --layer=model
-
Consistency Across Entities: By following a consistent naming and organization convention, this package helps to ensure that all entities in your application share a uniform structure. This consistency makes it easier to understand and maintain your codebase.
-
Improved Code Maintainability: With a well-structured codebase, developers can more effectively collaborate and maintain the application over time. This package promotes best practices for code organization.
In summary, laravel_utils-EntitiesManager simplifies entity management in Laravel by providing a structured approach and tools to generate and organize entity-related components. It enhances code maintainability, encourages best practices, and saves developers valuable time when working with entities in their Laravel applications.
Installation
Add the package in composer.json:
"repositories": [
{
"type": "vcs",
"url": "https://github.com/p-marco/laravel_utils/EntitiesManager"
}
],
"require": {
"p-marco/laravel_utils.entitiesManager": "dev-main"
}
Usage
// Basic usage:
artisan entity:generate {entity} {--layer}
// Create a model or other types (either if the Entity is already present or not):
artisan entity:generate Author --layer=model
artisan entity:generate Comment --layer=view
artisan entity:generate Post --layer=controller
The root folder is hardcoded as App\Entities. Future plans to make it configurable.
Changelog
v.1.1.0
- Root folder for entities generation is coded into config file, that can be published (!BREAKING FEATURES)
- Created default fallback when no --layer option is specified
p-marco/laravel_utils.entitiesmanager 适用场景与选型建议
p-marco/laravel_utils.entitiesmanager 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 6 次下载、GitHub Stars 达 0, 最近一次更新时间为 2023 年 11 月 27 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「composer」 「laravel」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 p-marco/laravel_utils.entitiesmanager 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 p-marco/laravel_utils.entitiesmanager 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 p-marco/laravel_utils.entitiesmanager 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
This composer plugin enables installation of GravityForms WordPress plugin and its addons.
Simple ASCII output of array data
Alfabank REST API integration
Generate a Composer repository from installed WordPress plugins and themes.
An image upload package which provides lot of functions such as upload, resize, crop, rotate, delete.
统计信息
- 总下载量: 6
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 14
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: GPL-3.0-or-later
- 更新时间: 2023-11-27