Added a Laravel IDE helper and type-hinted the cover art upload method.

This commit is contained in:
Peter Deltchev 2015-09-04 09:56:22 -07:00
parent 7daecbdd30
commit d86028310e
3 changed files with 6 additions and 5 deletions

View file

@ -117,7 +117,7 @@ return array(
'Illuminate\Workbench\WorkbenchServiceProvider', 'Illuminate\Workbench\WorkbenchServiceProvider',
'Intouch\LaravelNewrelic\LaravelNewrelicServiceProvider', 'Intouch\LaravelNewrelic\LaravelNewrelicServiceProvider',
'Barryvdh\LaravelIdeHelper\IdeHelperServiceProvider',
), ),
/* /*
@ -184,7 +184,6 @@ return array(
'View' => 'Illuminate\Support\Facades\View', 'View' => 'Illuminate\Support\Facades\View',
'Newrelic' => 'Intouch\LaravelNewrelic\Facades\Newrelic', 'Newrelic' => 'Intouch\LaravelNewrelic\Facades\Newrelic',
), ),
); );

View file

@ -5,6 +5,7 @@
use External; use External;
use Illuminate\Support\Facades\Config; use Illuminate\Support\Facades\Config;
use Illuminate\Support\Facades\URL; use Illuminate\Support\Facades\URL;
use Symfony\Component\HttpFoundation\File\UploadedFile;
class Image extends \Eloquent { class Image extends \Eloquent {
const NORMAL = 1; const NORMAL = 1;
@ -30,7 +31,7 @@
return null; return null;
} }
public static function upload($file, $user) { public static function upload(UploadedFile $file, $user) {
$userId = $user; $userId = $user;
if ($user instanceof User) if ($user instanceof User)
$userId = $user->id; $userId = $user->id;

View file

@ -4,7 +4,8 @@
"kriswallsmith/assetic": "1.2.*@dev", "kriswallsmith/assetic": "1.2.*@dev",
"codescale/ffmpeg-php": "2.7.0", "codescale/ffmpeg-php": "2.7.0",
"simplepie/simplepie": "1.3.1", "simplepie/simplepie": "1.3.1",
"intouch/laravel-newrelic": "*" "intouch/laravel-newrelic": "*",
"barryvdh/laravel-ide-helper": "~1.11"
}, },
"autoload": { "autoload": {
"classmap": [ "classmap": [