hyder/laravel-utils 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

hyder/laravel-utils

最新稳定版本:0.0.1

Composer 安装命令:

composer require hyder/laravel-utils

包简介

Utilities for Laravel applications, including various helpful features such as zip file creation, enum handling, and more.

README 文档

README

Utilities for Laravel applications, including various helpful features such as zip file creation, enum handling, and more.

Installation

You can install the package via Composer:

composer require hyder/laravel-utils

Configuration

After installing the package, you can publish the configuration file using Artisan:

php artisan vendor:publish --tag=laravel-utils-config

This will publish the configuration file laravel-utils.php to your config directory.

Configuration Options

The configuration file allows you to customize the behavior of the package:

// config/laravel-utils.php

return [
    'enums' => [
        // Directory path where enum classes are located
        'dir_path' => app_path('Enums'),

        // Namespace for enum classes
        'namespace' => 'App\Enums',
    ],
];

You can adjust the dir_path and namespace values to match your application's structure.

Usage

Enum Facade

The Enum facade allows you to work with enums in your Laravel application.

Listing Enums

You can list all available enums using the list method:

$enums = Enum::list();

This will return an array containing the constants of all enums.

Setting Directory and Namespace

You can set the directory and namespace for enums using the setDirectory and setNamespace methods, respectively before calling list method.

use Hyder\LaravelUtils\Facades\Enum;

Enum::setDirectory('path/to/enums')
->setNamespace('App\Enums')
->list();

License

Laravel Utils is open-source software licensed under the MIT license.

统计信息

  • 总下载量: 8
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 2
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2024-05-16

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固