@@ -25,13 +25,13 @@ |
||
| 25 | 25 | * Define this in your model. |
| 26 | 26 | * @var array |
| 27 | 27 | */ |
| 28 | - // protected $mediaFieldsSingle = ['file', 'image',]; |
|
| 28 | + // protected $mediaFieldsSingle = ['file', 'image',]; |
|
| 29 | 29 | |
| 30 | 30 | /** |
| 31 | 31 | * Define this in your model. |
| 32 | 32 | * @var array |
| 33 | 33 | */ |
| 34 | - // protected $mediaFieldsMultiple = ['files', 'images',]; |
|
| 34 | + // protected $mediaFieldsMultiple = ['files', 'images',]; |
|
| 35 | 35 | |
| 36 | 36 | /** |
| 37 | 37 | * Define this in your model if needed validation. |
@@ -115,7 +115,7 @@ discard block |
||
| 115 | 115 | $performOnCollections = []; |
| 116 | 116 | |
| 117 | 117 | foreach ($mediaFields as $field) { |
| 118 | - if (preg_match($pattern ,$field)) { |
|
| 118 | + if (preg_match($pattern, $field)) { |
|
| 119 | 119 | $performOnCollections[] = $field; |
| 120 | 120 | } |
| 121 | 121 | } |
@@ -188,7 +188,7 @@ discard block |
||
| 188 | 188 | |
| 189 | 189 | if ($field) { |
| 190 | 190 | $rules[$field] = $allRules[$field] ?? ''; |
| 191 | - if (isset($allRules[$field . '.*']) ) { |
|
| 191 | + if (isset($allRules[$field . '.*'])) { |
|
| 192 | 192 | $rules[$field . '.*'] = $allRules[$field . '.*']; |
| 193 | 193 | } |
| 194 | 194 | } else { |
@@ -96,7 +96,7 @@ |
||
| 96 | 96 | } |
| 97 | 97 | |
| 98 | 98 | if ($request->hasFile($field)) { |
| 99 | - $entity->getMedia($field)->each(function ($e) { |
|
| 99 | + $entity->getMedia($field)->each(function($e) { |
|
| 100 | 100 | $e->delete(); |
| 101 | 101 | }); |
| 102 | 102 | |
@@ -12,7 +12,7 @@ discard block |
||
| 12 | 12 | public function boot() |
| 13 | 13 | { |
| 14 | 14 | $this->publishes([ |
| 15 | - __DIR__.'/../config/medialibrary-extension.php' => config_path('medialibrary-extension.php') |
|
| 15 | + __DIR__ . '/../config/medialibrary-extension.php' => config_path('medialibrary-extension.php') |
|
| 16 | 16 | ], 'config'); |
| 17 | 17 | } |
| 18 | 18 | |
@@ -23,9 +23,9 @@ discard block |
||
| 23 | 23 | */ |
| 24 | 24 | public function register() |
| 25 | 25 | { |
| 26 | - $this->mergeConfigFrom(__DIR__.'/../config/medialibrary-extension.php', 'medialibrary-extension'); |
|
| 26 | + $this->mergeConfigFrom(__DIR__ . '/../config/medialibrary-extension.php', 'medialibrary-extension'); |
|
| 27 | 27 | |
| 28 | - $this->app->singleton(MediaLibraryManager::class, function () { |
|
| 28 | + $this->app->singleton(MediaLibraryManager::class, function() { |
|
| 29 | 29 | return new MediaLibraryManager(); |
| 30 | 30 | }); |
| 31 | 31 | |