@@ -60,8 +60,8 @@ |
||
60 | 60 | protected function makeSureCustomPropertiesUseRightCasing(array $media): array |
61 | 61 | { |
62 | 62 | $media = collect($media) |
63 | - ->map(function (array $mediaItemAttributes) { |
|
64 | - if (! isset($mediaItemAttributes['custom_properties']) && isset($mediaItemAttributes['customProperties'])) { |
|
63 | + ->map(function(array $mediaItemAttributes) { |
|
64 | + if (!isset($mediaItemAttributes['custom_properties']) && isset($mediaItemAttributes['customProperties'])) { |
|
65 | 65 | $mediaItemAttributes['custom_properties'] = $mediaItemAttributes['customProperties']; |
66 | 66 | unset($mediaItemAttributes['customProperties']); |
67 | 67 | } |
@@ -23,19 +23,19 @@ |
||
23 | 23 | |
24 | 24 | /** @var \Spatie\MediaLibrary\MediaCollections\Models\Media $media */ |
25 | 25 | $media = $temporaryUpload->media()->create([ |
26 | - 'name' => $request->name, |
|
27 | - 'uuid' => $request->uuid, |
|
28 | - 'collection_name' => 'default', |
|
29 | - 'file_name' => $request->name, |
|
30 | - 'mime_type' => $request->content_type, |
|
31 | - 'disk' => $diskName, |
|
32 | - 'conversions_disk' => $diskName, |
|
33 | - 'manipulations' => [], |
|
34 | - 'custom_properties' => [], |
|
35 | - 'responsive_images' => [], |
|
36 | - 'generated_conversions' => [], |
|
37 | - 'size' => $request->size, |
|
38 | - ]); |
|
26 | + 'name' => $request->name, |
|
27 | + 'uuid' => $request->uuid, |
|
28 | + 'collection_name' => 'default', |
|
29 | + 'file_name' => $request->name, |
|
30 | + 'mime_type' => $request->content_type, |
|
31 | + 'disk' => $diskName, |
|
32 | + 'conversions_disk' => $diskName, |
|
33 | + 'manipulations' => [], |
|
34 | + 'custom_properties' => [], |
|
35 | + 'responsive_images' => [], |
|
36 | + 'generated_conversions' => [], |
|
37 | + 'size' => $request->size, |
|
38 | + ]); |
|
39 | 39 | |
40 | 40 | /** @var \Spatie\MediaLibrary\Support\PathGenerator\PathGenerator $pathGenerator */ |
41 | 41 | $pathGenerator = PathGeneratorFactory::create($media); |
@@ -42,7 +42,7 @@ |
||
42 | 42 | |
43 | 43 | Storage::disk($diskName)->copy( |
44 | 44 | $request->key, |
45 | - $pathGenerator->getPath($media) . $request->name, |
|
45 | + $pathGenerator->getPath($media).$request->name, |
|
46 | 46 | ); |
47 | 47 | |
48 | 48 | $fileManipulator->createDerivedFiles($media); |
@@ -18,11 +18,11 @@ |
||
18 | 18 | { |
19 | 19 | parent::boot(); |
20 | 20 | |
21 | - static::saving(function () { |
|
21 | + static::saving(function() { |
|
22 | 22 | self::cacheKey(); |
23 | 23 | }); |
24 | 24 | |
25 | - static::deleting(function () { |
|
25 | + static::deleting(function() { |
|
26 | 26 | self::cacheKey(); |
27 | 27 | }); |
28 | 28 | } |
@@ -18,11 +18,11 @@ |
||
18 | 18 | { |
19 | 19 | parent::boot(); |
20 | 20 | |
21 | - static::saving(function () { |
|
21 | + static::saving(function() { |
|
22 | 22 | self::cacheKey(); |
23 | 23 | }); |
24 | 24 | |
25 | - static::deleting(function () { |
|
25 | + static::deleting(function() { |
|
26 | 26 | self::cacheKey(); |
27 | 27 | }); |
28 | 28 | } |
@@ -18,11 +18,11 @@ |
||
18 | 18 | { |
19 | 19 | parent::boot(); |
20 | 20 | |
21 | - static::saving(function () { |
|
21 | + static::saving(function() { |
|
22 | 22 | self::cacheKey(); |
23 | 23 | }); |
24 | 24 | |
25 | - static::deleting(function () { |
|
25 | + static::deleting(function() { |
|
26 | 26 | self::cacheKey(); |
27 | 27 | }); |
28 | 28 | } |
@@ -18,11 +18,11 @@ |
||
18 | 18 | { |
19 | 19 | parent::boot(); |
20 | 20 | |
21 | - static::saving(function () { |
|
21 | + static::saving(function() { |
|
22 | 22 | self::cacheKey(); |
23 | 23 | }); |
24 | 24 | |
25 | - static::deleting(function () { |
|
25 | + static::deleting(function() { |
|
26 | 26 | self::cacheKey(); |
27 | 27 | }); |
28 | 28 | } |
@@ -18,11 +18,11 @@ |
||
18 | 18 | { |
19 | 19 | parent::boot(); |
20 | 20 | |
21 | - static::saving(function () { |
|
21 | + static::saving(function() { |
|
22 | 22 | self::cacheKey(); |
23 | 23 | }); |
24 | 24 | |
25 | - static::deleting(function () { |
|
25 | + static::deleting(function() { |
|
26 | 26 | self::cacheKey(); |
27 | 27 | }); |
28 | 28 | } |
@@ -18,11 +18,11 @@ |
||
18 | 18 | { |
19 | 19 | parent::boot(); |
20 | 20 | |
21 | - static::saving(function () { |
|
21 | + static::saving(function() { |
|
22 | 22 | self::cacheKey(); |
23 | 23 | }); |
24 | 24 | |
25 | - static::deleting(function () { |
|
25 | + static::deleting(function() { |
|
26 | 26 | self::cacheKey(); |
27 | 27 | }); |
28 | 28 | } |
@@ -18,11 +18,11 @@ |
||
18 | 18 | { |
19 | 19 | parent::boot(); |
20 | 20 | |
21 | - static::saving(function () { |
|
21 | + static::saving(function() { |
|
22 | 22 | self::cacheKey(); |
23 | 23 | }); |
24 | 24 | |
25 | - static::deleting(function () { |
|
25 | + static::deleting(function() { |
|
26 | 26 | self::cacheKey(); |
27 | 27 | }); |
28 | 28 | } |