Skip to content

Commit 4a7322a

Browse files
committed
refactor codebase.
1 parent 7811b6d commit 4a7322a

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

packages/Webkul/Admin/src/Resources/views/settings/data-transfer/imports/edit.blade.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ class="mt-1 cursor-pointer text-sm text-brandColor transition-all hover:underlin
121121
id="uploaded-file-link"
122122
class="mt-1 cursor-pointer text-sm text-brandColor transition-all hover:underline"
123123
>
124-
{{ $import?->file_path }}
124+
{{ $import?->file_name }}
125125
</a>
126126
@endif
127127
</div>

packages/Webkul/DataTransfer/src/Models/Import.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,4 +52,12 @@ public function batches(): HasMany
5252
{
5353
return $this->hasMany(ImportBatchProxy::modelClass());
5454
}
55+
56+
/**
57+
* Get the file name.
58+
*/
59+
public function getFileNameAttribute(): string
60+
{
61+
return preg_replace('/^.*?\/\d+-/', '', $this->file_path);
62+
}
5563
}

0 commit comments

Comments
 (0)