feat: Add MinIO storage support and update image URLs
All checks were successful
Deploy Production (merchbay.com) / deploy (push) Successful in 2m54s

- Implemented MinIO storage driver in AppServiceProvider for S3-compatible storage.
- Added helper functions to generate MinIO URLs for files and images.
- Updated filesystem configuration to include MinIO settings.
- Modified site configuration to include MinIO URL.
- Enhanced Docker Compose configuration for local development with MinIO.
- Updated various Blade templates to use MinIO URLs for images instead of local paths.
- Ensured all image references in views are now pointing to MinIO storage.
This commit is contained in:
Frank John Begornia
2026-05-13 00:25:23 +08:00
parent 6c97e60805
commit ad8d8d7564
28 changed files with 229 additions and 76 deletions

View File

@@ -450,7 +450,7 @@
@foreach ($pattern_arrays as $i => $val)
<div class="item @if ($i == 0) active @endif">
<div class="btn-group patternBox ">
<button type="button" data-pattern-path="{{ $val[0]->SVGPath }}" class="patternThumbs btn" data-id="{{ $val[0]->PatternId }}" style="background-image:url('{{ config('site_config.uploads') }}{{ $val[0]->PatternThumbnail }}'); background-size:cover; background-repeat: no-repeat;" @if ($i == 0) disabled @endif> @if ($i == 0) <i class="fa fa-2 fa-check" aria-hidden="true"></i> @endif</button>
<button type="button" data-pattern-path="{{ $val[0]->SVGPath }}" class="patternThumbs btn" data-id="{{ $val[0]->PatternId }}" style="background-image:url('{{ minio_url($val[0]->PatternThumbnail) }}'); background-size:cover; background-repeat: no-repeat;" @if ($i == 0) disabled @endif> @if ($i == 0) <i class="fa fa-2 fa-check" aria-hidden="true"></i> @endif</button>
</div>
</div>
@endforeach
@@ -550,7 +550,7 @@
@foreach ($pattern_arrays as $r => $val)
<div class="item @if ($r == 0) active @endif">
<div class="btn-group patternBox ">
<button type="button" data-pattern-path="{{ $val[0]->SVGPath }}" class="patternTrimThumbs patternTrim{{ $i }} btn" data-id="{{ $val[0]->PatternId }}" data-trim="{{ $i }}" style="background-image:url('{{ config('site_config.uploads') }}{{ $val[0]->PatternThumbnail }}'); background-size:cover; background-repeat: no-repeat;" @if ($r == 0) disabled @endif> @if ($r == 0) <i class="fa fa-2 fa-check" aria-hidden="true"></i> @endif</button>
<button type="button" data-pattern-path="{{ $val[0]->SVGPath }}" class="patternTrimThumbs patternTrim{{ $i }} btn" data-id="{{ $val[0]->PatternId }}" data-trim="{{ $i }}" style="background-image:url('{{ minio_url($val[0]->PatternThumbnail) }}'); background-size:cover; background-repeat: no-repeat;" @if ($r == 0) disabled @endif> @if ($r == 0) <i class="fa fa-2 fa-check" aria-hidden="true"></i> @endif</button>
</div>
</div>
@endforeach
@@ -1356,7 +1356,7 @@
var patternSVGPath = $(this).attr('data-pattern-path');
var patternPath = "{{ config('site_config.uploads') }}" + patternSVGPath;
var patternPath = "{{ minio_url('') }}" + patternSVGPath;
var SideAndPath = {!! json_encode($templatepaths_arrays) !!};
@@ -1433,7 +1433,7 @@
$(document).on('button click', '.patternTrimThumbs', function(){
var patternSVGPath = $(this).attr('data-pattern-path');
var patternPath = "{{ config('site_config.uploads') }}" + patternSVGPath;
var patternPath = "{{ minio_url('') }}" + patternSVGPath;
var getTrimId = $(this).attr('data-trim');
var SideAndPath = {!! json_encode($templatepaths_arrays) !!};
@@ -1577,7 +1577,7 @@
var gradientIds = sideName+"_"+type+"_Gradients";
var gradientPrefix = sideName+"_"+type+"_";
var tempPath = "{{ config('site_config.uploads') }}" + pathLocation;
var tempPath = "{{ minio_url('') }}" + pathLocation;
console.log(tempPath)
if(!document.getElementById(objectId))
return false;
@@ -1761,7 +1761,7 @@
var type = SideAndPath[i]['Type'];
var pathLocation = SideAndPath[i]['Path'];
var canvasName = "canvas_" + type + "_" + sideName;
var tempPath = "{{ config('site_config.uploads') }}" + pathLocation;
var tempPath = "{{ minio_url('') }}" + pathLocation;
window['canvas_' + type + '_' + sideName] = new fabric.Canvas(canvasName);
var templateFormat = SideAndPath[i]['TemplateFormat'];
@@ -2093,9 +2093,9 @@
if(objType == "curvedText"){
if(obj.effect == "curved"){
$('#teamname_text_shape').html('Text Shape: <br><img src="{{ config('site_config.uploads') }}text-shapes-logo/curve-logo.png" height="30px">');
$('#teamname_text_shape').html('Text Shape: <br><img src="{{ minio_url('text-shapes-logo/curve-logo.png') }}" height="30px">');
}else if(obj.effect == "arc"){
$('#teamname_text_shape').html('Text Shape: <br><img src="{{ config('site_config.uploads') }}text-shapes-logo/arch-logo.png" height="30px">');
$('#teamname_text_shape').html('Text Shape: <br><img src="{{ minio_url('text-shapes-logo/arch-logo.png') }}" height="30px">');
}else{
$('#teamname_text_shape').html('Add text Shape');
}
@@ -3395,7 +3395,7 @@
function loadSVGClipart(dataUrl){
var k = 0;
var arrayPathId = [];
var svgUrl = "{{ config('site_config.uploads') }}cliparts/" + dataUrl;
var svgUrl = "{{ minio_url('cliparts/') }}" + dataUrl;
fabric.loadSVGFromURL(svgUrl, function(objects, options) {
var clipart = fabric.util.groupSVGElements(objects, options );
clipart.set({