@@ -52,10 +52,10 @@ |
||
52 | 52 | * Uploads the file/files or asset by creating the |
53 | 53 | * asset that is needed to upload the files too. |
54 | 54 | * |
55 | - * @param $file |
|
55 | + * @param string $file |
|
56 | 56 | * @param string|null $filename |
57 | 57 | * @param bool $keepOriginal |
58 | - * @return \Illuminate\Support\Collection|null|Asset |
|
58 | + * @return null|Asset |
|
59 | 59 | * @throws \Spatie\MediaLibrary\Exceptions\FileCannotBeAdded |
60 | 60 | * @internal param array|string $files |
61 | 61 | */ |
@@ -2,10 +2,10 @@ |
||
2 | 2 | |
3 | 3 | namespace Thinktomorrow\AssetLibrary\Models; |
4 | 4 | |
5 | -use Traversable; |
|
5 | +use Illuminate\Database\Eloquent\Model; |
|
6 | 6 | use Illuminate\Http\File; |
7 | 7 | use Illuminate\Http\UploadedFile; |
8 | -use Illuminate\Database\Eloquent\Model; |
|
8 | +use Traversable; |
|
9 | 9 | |
10 | 10 | class AssetUploader extends Model |
11 | 11 | { |
@@ -2,14 +2,14 @@ |
||
2 | 2 | |
3 | 3 | namespace Thinktomorrow\AssetLibrary\Models; |
4 | 4 | |
5 | -use Spatie\MediaLibrary\Media; |
|
6 | -use Thinktomorrow\Locale\Locale; |
|
7 | -use Illuminate\Support\Collection; |
|
8 | 5 | use Illuminate\Database\Eloquent\Model; |
6 | +use Illuminate\Support\Collection; |
|
9 | 7 | use Spatie\MediaLibrary\HasMedia\HasMediaTrait; |
10 | -use Thinktomorrow\AssetLibrary\Exceptions\ConfigException; |
|
11 | -use Thinktomorrow\AssetLibrary\Exceptions\AssetUploadException; |
|
12 | 8 | use Spatie\MediaLibrary\HasMedia\Interfaces\HasMediaConversions; |
9 | +use Spatie\MediaLibrary\Media; |
|
10 | +use Thinktomorrow\AssetLibrary\Exceptions\AssetUploadException; |
|
11 | +use Thinktomorrow\AssetLibrary\Exceptions\ConfigException; |
|
12 | +use Thinktomorrow\Locale\Locale; |
|
13 | 13 | |
14 | 14 | /** |
15 | 15 | * @property mixed media |
@@ -2,11 +2,11 @@ |
||
2 | 2 | |
3 | 3 | namespace Thinktomorrow\AssetLibrary\Traits; |
4 | 4 | |
5 | -use Traversable; |
|
6 | -use Thinktomorrow\Locale\Locale; |
|
7 | -use Thinktomorrow\AssetLibrary\Models\Asset; |
|
8 | 5 | use Spatie\MediaLibrary\HasMedia\HasMediaTrait; |
6 | +use Thinktomorrow\AssetLibrary\Models\Asset; |
|
9 | 7 | use Thinktomorrow\AssetLibrary\Models\AssetUploader; |
8 | +use Thinktomorrow\Locale\Locale; |
|
9 | +use Traversable; |
|
10 | 10 | |
11 | 11 | trait AssetTrait |
12 | 12 | { |