Skip to content

Commit 0facc28

Browse files
committed
added the sources
1 parent 931fe35 commit 0facc28

File tree

8 files changed

+570
-0
lines changed

8 files changed

+570
-0
lines changed

.gitignore

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
vendor/
2+
# Created by https://www.gitignore.io/api/osx,phpstorm
3+
4+
### OSX ###
5+
*.DS_Store
6+
.AppleDouble
7+
.LSOverride
8+
9+
# Icon must end with two \r
10+
Icon
11+
12+
13+
# Thumbnails
14+
._*
15+
16+
# Files that might appear in the root of a volume
17+
.DocumentRevisions-V100
18+
.fseventsd
19+
.Spotlight-V100
20+
.TemporaryItems
21+
.Trashes
22+
.VolumeIcon.icns
23+
.com.apple.timemachine.donotpresent
24+
25+
# Directories potentially created on remote AFP share
26+
.AppleDB
27+
.AppleDesktop
28+
Network Trash Folder
29+
Temporary Items
30+
.apdisk
31+
32+
# User-specific stuff:
33+
.idea/
34+
35+
# Sensitive or high-churn files:
36+
.idea/dataSources.ids
37+
.idea/dataSources.xml
38+
.idea/dataSources.local.xml
39+
.idea/sqlDataSources.xml
40+
.idea/dynamic.xml
41+
.idea/uiDesigner.xml
42+
43+
# Gradle:
44+
.idea/gradle.xml
45+
.idea/libraries
46+
47+
# Mongo Explorer plugin:
48+
.idea/mongoSettings.xml
49+
50+
## File-based project format:
51+
*.iws
52+
53+
## Plugin-specific files:
54+
55+
# IntelliJ
56+
/out/
57+
58+
# mpeltonen/sbt-idea plugin
59+
.idea_modules/
60+
61+
# JIRA plugin
62+
atlassian-ide-plugin.xml
63+
64+
# Crashlytics plugin (for Android Studio and IntelliJ)
65+
com_crashlytics_export_strings.xml
66+
crashlytics.properties
67+
crashlytics-build.properties
68+
fabric.properties
69+
70+
### PhpStorm Patch ###
71+
# Comment Reason: https://github.com/joeblau/gitignore.io/issues/186#issuecomment-215987721
72+
73+
# *.iml
74+
# modules.xml

README.md

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
# laravel-tinify
2+
3+
This package provides integration with the Tinify a.k.a TinyPNG API.
4+
5+
The package simply provides a Tinify facade that acts as a wrapper to the [tinify/tinfiy-php](https://github.com/tinify/tinify-php)
6+
7+
It was originaly developed by [Marvin Oßwald](https://github.com/marvinosswald/laravel-tinify)
8+
9+
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.
10+
So, I converted it to use the api_key from config which can be defined to load from `env` and still use the
11+
`php artisan config:cache command` and it works.
12+
13+
## Installation
14+
15+
Install via composer by adding the following to your composer.json:
16+
17+
```json
18+
...
19+
"require": {
20+
"msonowal/laravel-tinify": "~1.0"
21+
}
22+
...
23+
```
24+
25+
Add service provider to ```config/app.php```:
26+
27+
```php
28+
...
29+
msonowal\LaravelTinify\LaravelTinifyServiceProvider::class
30+
...
31+
```
32+
33+
Add alias to ```config/app.php```:
34+
35+
```php
36+
...
37+
'Tinify' => msonowal\LaravelTinify\Facades\Tinify::class
38+
...
39+
```
40+
41+
## Configuration
42+
Publish the Configuration for the package which will create the config file tinify.php inside config directory
43+
44+
`php artisan vendor:publish --provider="msonowal\LaravelTinify\LaravelTinifyServiceProvider"`
45+
46+
Set a env variable "TINIFY_APIKEY" with your issued apikey or set api_key into config/tinify.php
47+
48+
This package is available under the [MIT license](http://opensource.org/licenses/MIT).

composer.json

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
{
2+
"name": "msonowal/laravel-tinify",
3+
"type": "library",
4+
"description": "Laravel Facade for tinify API",
5+
"keywords": ["tinify","tinypng"],
6+
"license": "MIT",
7+
"authors": [
8+
{
9+
"name": "Manash Jyoti Sonowal",
10+
"email": "manash149@gmail.com"
11+
}
12+
],
13+
"require": {
14+
"php": ">=5.5.0",
15+
"illuminate/support": "5.1.*|5.2.*|5.3.*|5.4.*",
16+
"tinify/tinify":"~1.1"
17+
},
18+
"autoload": {
19+
"psr-4": {
20+
"msonowal\\LaravelTinify\\": "src"
21+
}
22+
},
23+
"minimum-stability": "stable"
24+
}

0 commit comments

Comments
 (0)