mald/cdn-helper
Composer 安装命令:
composer require mald/cdn-helper
包简介
Helper function to create CDN url's
README 文档
README
CDN helper
Installation
- First install the helper with composer:
composer require mald/cdn-helper
- Publish assets:
php artisan vendor:publish --tag=mald-cdn-helper
Add CDN_URL to the .env of the project with the correct url towards the cdn, for example:
CDN_URL=https://d1pj9b3xsimjd0.cloudfront.net
Usage
Within our project you can use the cdn() helper function which accepts 3 parameters:
<?php if (!function_exists('cdn')) { function cdn(string $path, ?string $dimensions = null, ?string $mode = 'crop'): string { return new \CdnHelper\Url($path, $dimensions, $mode); } }
Testing
Run the tests with;
./vendor/bin/phpunit
统计信息
- 总下载量: 403
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: proprietary
- 更新时间: 2019-11-13