From d86028310e5c05b87a87bcce30bb208d94032f9b Mon Sep 17 00:00:00 2001 From: Peter Deltchev Date: Fri, 4 Sep 2015 09:56:22 -0700 Subject: [PATCH] Added a Laravel IDE helper and type-hinted the cover art upload method. --- app/config/app.php | 3 +-- app/models/Entities/Image.php | 5 +++-- composer.json | 3 ++- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/app/config/app.php b/app/config/app.php index a68e4624..ddf90312 100644 --- a/app/config/app.php +++ b/app/config/app.php @@ -117,7 +117,7 @@ return array( 'Illuminate\Workbench\WorkbenchServiceProvider', 'Intouch\LaravelNewrelic\LaravelNewrelicServiceProvider', - + 'Barryvdh\LaravelIdeHelper\IdeHelperServiceProvider', ), /* @@ -184,7 +184,6 @@ return array( 'View' => 'Illuminate\Support\Facades\View', 'Newrelic' => 'Intouch\LaravelNewrelic\Facades\Newrelic', - ), ); diff --git a/app/models/Entities/Image.php b/app/models/Entities/Image.php index 60cb483b..9da437d6 100644 --- a/app/models/Entities/Image.php +++ b/app/models/Entities/Image.php @@ -5,6 +5,7 @@ use External; use Illuminate\Support\Facades\Config; use Illuminate\Support\Facades\URL; + use Symfony\Component\HttpFoundation\File\UploadedFile; class Image extends \Eloquent { const NORMAL = 1; @@ -30,7 +31,7 @@ return null; } - public static function upload($file, $user) { + public static function upload(UploadedFile $file, $user) { $userId = $user; if ($user instanceof User) $userId = $user->id; @@ -97,4 +98,4 @@ if (!is_dir($destination)) mkdir($destination, 777, true); } - } \ No newline at end of file + } diff --git a/composer.json b/composer.json index de751d80..40a56aa0 100644 --- a/composer.json +++ b/composer.json @@ -4,7 +4,8 @@ "kriswallsmith/assetic": "1.2.*@dev", "codescale/ffmpeg-php": "2.7.0", "simplepie/simplepie": "1.3.1", - "intouch/laravel-newrelic": "*" + "intouch/laravel-newrelic": "*", + "barryvdh/laravel-ide-helper": "~1.11" }, "autoload": { "classmap": [