msonowal/laravel-tinify

Laravel Facade for tinify API
5,288 5
Install
composer require msonowal/laravel-tinify
Latest Version:1.0.4
PHP:>=7.4
Laravel:6 · 7 · 8
Older releases:5
License:MIT
Last Updated:Jun 17, 2024
Links: GitHub  ·  Packagist
Maintainer: msonowal

laravel-tinify

This package provides integration with the Tinify a.k.a TinyPNG API.

Latest Stable Version Total Downloads

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.

Related Packages

michaelthuren/tinify-laravel-client

Tinify API support with laravel (TinyPNG)

4,337 2
doctrine/dbal

Powerful PHP database abstraction layer (DBAL) with many features for database s...

644,549,754 9,698
laravel/framework

The Laravel Framework.

593,882,149 34,959
laravel/tinker

Powerful REPL for the Laravel framework.

507,193,856 7,441

Version History

Version Released PHP Laravel License
1.0.4 >=7.4 ^6.0 || ^7.0 || ^8.0 MIT
v1.0.3 >=5.5.0 5.5.*|5.6.*|5.7.*|5.8.x MIT
1.0.2 >=5.5.0 5.1.*|5.2.*|5.3.*|5.4.*|5.5.*|5.6.*|5.7.* MIT
1.0.1 >=5.5.0 5.1.*|5.2.*|5.3.*|5.4.*|5.5.* MIT
1.0 >=5.5.0 5.1.*|5.2.*|5.3.*|5.4.* MIT