定制 maniaba/asset-connect 二次开发

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

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

maniaba/asset-connect

最新稳定版本:v1.0.0-beta2

Composer 安装命令:

composer require maniaba/asset-connect

包简介

AssetConnect is a file management library for CodeIgniter 4 that allows you to associate files with any entity in your application

README 文档

README

PHPUnit PHPStan Deptrac Psalm Docs

PHP CodeIgniter License

AssetConnect is a file management library for CodeIgniter 4 that allows you to associate files with any entity in your application. It provides a robust, flexible solution for handling file uploads, storage, and retrieval with powerful features like collections, custom properties, and secure access control.

Requirements

  • PHP 8.3 or higher
  • CodeIgniter 4.6 or higher
  • CodeIgniter Queue

Example Usage

// Add an asset to a user
$asset = $user->addAsset('/path/to/file.jpg')
    ->withCustomProperties([
        'title' => 'Profile Picture',
        'description' => 'User profile picture'
    ])
    ->toAssetCollection();

// Get all assets for a user
$assets = $user->getAssets();

// Get the URL to an asset
$url = $user->getFirstAsset()->getUrl();

// Delete assets from a specific collection
$user->deleteAssets(ImagesCollection::class);

Documentation

Comprehensive documentation is available at https://maniaba.github.io/asset-connect/.

Find yourself stuck using the package? Found a bug? Do you have general questions or suggestions for improving the media library? Feel free to create an issue on GitHub, we'll try to address it as soon as possible.

Testing

Run the test suite with:

composer test

For more detailed testing options:

# Run with code coverage
composer test -- --coverage-html=build/coverage

# Run static analysis
composer analyze

Changelog

All notable changes to this project are documented in the CHANGELOG.md file.

Contributing

Contributions are welcome! Please see CONTRIBUTING.md for details on how to contribute to this project.

Security

If you discover a security vulnerability, please send an email to maniaba@outlook.com instead of using the issue tracker. All security vulnerabilities will be promptly addressed.

License

The MIT License (MIT). Please see License File for more information.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-07-05