Skip to content

Commit 89cfb44

Browse files
committed
updating to stable version
1 parent c0558c5 commit 89cfb44

File tree

4 files changed

+14
-5
lines changed

4 files changed

+14
-5
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# Created by .ignore support plugin (hsz.mobi)

src/ImageUploader.php

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,18 @@
55

66
class ImageUploader extends Uploader
77
{
8-
public function __construct($image = null)
8+
public function __construct($image = null, $destination = null)
99
{
1010
$this->image = $image;
11-
$this->destination = 'uploads/images/';
12-
$this->thumbWidth = 100;
11+
12+
if ($destination == null)
13+
{
14+
$this->destination = 'uploads/images/';
15+
}else{
16+
$this->destination = $destination;
17+
}
18+
19+
$this->thumbWidth = 150;
1320

1421
if (!is_dir(public_path($this->destination)))
1522
{

src/Provider/LaravelUploaderServiceProvider.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ public function register()
3131
$this->app->register('Intervention\Image\ImageServiceProvider');
3232
$this->app->bind('Image', 'Intervention\Image\Facades\Image');
3333

34+
3435
$this->app['laraveluploader'] = $this->app->share(function($app)
3536
{
3637
return new ImageUploader();
@@ -40,4 +41,4 @@ public function register()
4041

4142

4243

43-
}
44+
}

src/Uploader.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,4 +164,4 @@ public function uploadImageThumb($thumb)
164164
return $thumb;
165165
}
166166

167-
}
167+
}

0 commit comments

Comments
 (0)