Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
iamgergo committed Mar 7, 2024
1 parent 6944a03 commit a1b2fed
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 7 deletions.
8 changes: 6 additions & 2 deletions resources/views/media/medium.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,16 @@ class="media-item"
</span>
</template>
<template x-if="! item.processing && item.isImage">
<img x-bind:src="item.url" x-bind:alt="item.label">
<img
x-bind:src="item.url"
x-bind:alt="item.fileName"
onerror="this.src = '/vendor/root/image-loading-placeholder.svg';"
>
</template>
<template x-if="! item.processing && ! item.isImage">
<span class="media-item__background">
<x-root::icon name="document" class="media-item__icon" />
<span x-text="item.label" class="media-item__name"></span>
<span x-text="item.fileName" class="media-item__name"></span>
</span>
</template>
</li>
Empty file.
2 changes: 1 addition & 1 deletion src/Fields/BelongsToMany.php
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ public function getValueForHydrate(Request $request): mixed
*/
public function mergePivotValues(array $value): mixed
{
$value = Arr::isList($value) ? array_fill_keys($value, []) : $value;
$value = array_is_list($value) ? array_fill_keys($value, []) : $value;

return array_map(function (array $pivot): array {
return array_merge($this->pivotValues, $pivot);
Expand Down
1 change: 1 addition & 0 deletions src/Fields/File.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ public function __construct(string $label, Closure|string|null $modelAttribute =
{
parent::__construct($label, $modelAttribute, $relation);

$this->name($this->modelAttribute);
$this->type('file');
$this->multiple(false);
$this->class(['form-file']);
Expand Down
4 changes: 1 addition & 3 deletions src/Fields/Media.php
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,7 @@ public function getModel(): Model
*/
public function fields(Request $request): array
{
return [
//
];
return [];
}

/**
Expand Down
2 changes: 1 addition & 1 deletion src/Root.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class Root
*
* @var string
*/
public const VERSION = '2.2.0';
public const VERSION = '2.2.1';

/**
* The registered booting callbacks.
Expand Down

0 comments on commit a1b2fed

Please sign in to comment.