msonowal/laravel-tinify
最新稳定版本:1.0.4
Composer 安装命令:
composer require msonowal/laravel-tinify
包简介
Laravel Facade for tinify API
README 文档
README
This package provides integration with the Tinify a.k.a TinyPNG API.
The package simply provides a Tinify facade that acts as a wrapper to the tinify/tinfiy-php
It was originaly developed by Marvin Oßwald
I added functionality to use of laravel bulit in config cache helper which was having issues of returning null when configs are cached via php artisan config:cache because it was directly loading via env helper.
So, I converted it to use the api_key from config which can be defined to load from env and still use the
php artisan config:cache command and it works.
For Laravel < 5.5, please use the 1.0.2 Tag!
Installation
Install the package via Composer:
composer require msonowal/laravel-tinify
Laravel 5.5+:
If you don't use auto-discovery, add the ServiceProvider to the providers array in config/app.php
... msonowal\LaravelTinify\LaravelTinifyServiceProvider::class ...
Add alias to config/app.php:
... 'Tinify' => msonowal\LaravelTinify\Facades\Tinify::class ...
Configuration
Publish the Configuration for the package which will create the config file tinify.php inside config directory
php artisan vendor:publish --provider="msonowal\LaravelTinify\LaravelTinifyServiceProvider"
Set a env variable "TINIFY_APIKEY" with your issued apikey or set api_key into config/tinify.php
This package is available under the MIT license.
统计信息
- 总下载量: 5.04k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 6
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2017-03-14