定制 hassanzohdy/mongez 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

hassanzohdy/mongez

Composer 安装命令:

composer require hassanzohdy/mongez

包简介

A Robust application handler for building neat laravel application(s).

README 文档

README

This project aims to make using Laravel framework more organized and extensible.

Table of contents

Requirements

  • Laravel >=11

For compatibility with Laravel 10, please use version 3.0 of this package.

For compatibility with older versions of Laravel, please use version 2.x of this package.

Installation

Run the following Command in your cli.

composer require hassanzohdy/mongez

Configurations

Once its done run the following command to create the config/mongez.php file.

php artisan vendor:publish --provider="HZ\Illuminate\Mongez\Providers\MongezServiceProvider"

Translatable

<?php
use HZ\Illuminate\Mongez\Translation\Traits\Translatable;

class MyClass
{
  use Translatable;

  public function index()
  {
    $this->transUsers('users.name'); // will translate from `Users` module and `users` file and the keyword is `name
    $this->transUsers('usersGroups.permissions'); // will translate from `Users` module and `usersGroups` file and the keyword is `permissions
  }
}

Change Log

  • 3.1.0 (29 Sep 2024)
    • Update codebase to support laravel 11+
    • Remove Carbon setWeekStartsAt and setWeekEndsAt as it was removed from carbon.
  • 3.0.1 (29 Sep 2024)
    • Update codebase to support laravel 10 with new mongodb elquent integration
  • 2.24.2 (24 Dec 2023)
    • Fixed request sql options is overwritten by current class sql options
  • 2.24.1 (24 Nov 2022)
    • Fixed empty array of date in date_response.
  • 2.24.0 (24 Nov 2022)
    • Enhanced Resource Manager Errors to display the resource class name.
  • 2.23.5 (23 Oct 2022)
    • Now generated model will have casts property instead of dates for date casting.
  • 2.23.4 (22 Oct 2022)
    • Fixed defining the class namespace of UTCDateTime in functions.php file.
  • 2.23.3 (22 Oct 2022)
    • Fixed collectables to return proper array syntax instead of objects.
  • 2.22.2 (28 Aug 2022)
    • Fixed ARRAYABLE_DATA on listing as it is encoded to json.
  • 2.22.1 (28 Aug 2022)
    • RepositoryManager.wrapMany will return empty array without passing the collection to the resource if teh given array|collection is empty.
  • 2.22.0 (28 Aug 2022)
    • config/mongez.php config
    • Changed misc key to date.
    • Changed CarbonImmutable to immutable under date key.
    • Added week_starts_at and defaults to Saturday.
    • Added week_ends_at and defaults to Friday.
  • 2.21.0 (27 Aug 2022)
    • Added getPaginationInfo in the repository manager.
    • getPaginateInfo now is deprecated and will be removed in V3.0.
    • Added first method to return the first matched element, takes the same array options as listModels and return one model.
  • 2.20.0 (27 Aug 2022)
    • Added saveActionType property to the repository, it can be used in setData, and its value will depend on the current action, static::CREATE_ACTION | static::UPDATE_ACTION | static::PATCH_ACTION.
  • 2.18.0 (17 Aug 2022)
    • Added date_response to format the given date to timestamp humanTime text and format outputs.
    • Added localized_date to convert the given date into formatted date based on the locale code.
    • Used date_response in the resource manager to collect dates.
  • 2.17.0 (15 Aug 2022)
    • Added Aggregate Utilities
  • 2.16.0 (14 Aug 2022)
    • Added date and date:between filters to FILTER_BY repository constant.
  • 2.15.0 (12 Aug 2022)
    • Added carbonImmutable feature to change the now function into immutable carbon instance.
  • 2.14.0 (10 Aug 2022)
    • Added LOCATION_DATA constant to resource manager to return proper geo location data.
  • 2.12.0 (26 July 2022)
    • Added LOCALIZED_COLLECTABLE_DATA constant to resource manager to localize data that are in array list.
  • 2.11.0 (23 July 2022)
    • Now WHEN_AVAILABLE in resource manager if set to true, it will strip out any missing value from the model so the resource will only return existing data without any default values for any missing data.
  • 2.1.21 (28 Feb 2022)
    • Fixed Multiple Trait Methods Alias
  • 2.1.20 (28 Feb 2022)
    • Fixed Missing Semi Colon
  • 2.1.19 (28 Feb 2022)
    • Fixed Model, Resource and Filter in the repository while creating child module to receive the child module name instead of the parent module.
  • 2.1.17 (28 Feb 2022)
    • Added Translatable trait.
  • 2.1.14 (28 Feb 2022)
    • Fixed generated database directory to be Database.

Documentation

See full documentation in the wiki page.

hassanzohdy/mongez 适用场景与选型建议

hassanzohdy/mongez 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 2.25k 次下载、GitHub Stars 达 19, 最近一次更新时间为 2019 年 09 月 21 日, 在 PHP 生态内属于活跃度较高的组件。

它主要适用于以下技术方向: 「module」 「builder」 「laravel」 「mongez」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。

我们在过去多个企业项目中使用过 hassanzohdy/mongez 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 hassanzohdy/mongez 我们能提供哪些服务?
定制开发 / 二次开发

基于 hassanzohdy/mongez 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

  • 总下载量: 2.25k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 19
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 19
  • Watchers: 5
  • Forks: 14
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2019-09-21