feat: Add MinIO storage support and update image URLs
All checks were successful
Deploy Production (merchbay.com) / deploy (push) Successful in 2m54s
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:
@@ -3,6 +3,7 @@
|
||||
namespace App\Exceptions;
|
||||
|
||||
use Exception;
|
||||
use Throwable;
|
||||
use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler;
|
||||
use Symfony\Component\HttpKernel\Exception\MethodNotAllowedHttpException;
|
||||
|
||||
@@ -23,11 +24,16 @@ class Handler extends ExceptionHandler
|
||||
*
|
||||
* This is a great spot to send exceptions to Sentry, Bugsnag, etc.
|
||||
*
|
||||
* @param \Exception $e
|
||||
* @param \Throwable $e
|
||||
* @return void
|
||||
*/
|
||||
public function report(Exception $e)
|
||||
public function report(Throwable $e)
|
||||
{
|
||||
// Laravel 5.0 parent expects an Exception; wrap Error instances so
|
||||
// PHP 7+ fatal errors (TypeError, ParseError, etc.) are handled safely.
|
||||
if (!$e instanceof Exception) {
|
||||
$e = new \RuntimeException($e->getMessage(), $e->getCode());
|
||||
}
|
||||
return parent::report($e);
|
||||
}
|
||||
|
||||
@@ -43,11 +49,13 @@ class Handler extends ExceptionHandler
|
||||
// return parent::render($request, $e);
|
||||
// }
|
||||
|
||||
public function render($request, Exception $e)
|
||||
public function render($request, Throwable $e)
|
||||
{
|
||||
if ($e instanceof MethodNotAllowedHttpException) {
|
||||
abort(404);
|
||||
}
|
||||
return parent::render($request, $e);
|
||||
// Wrap non-Exception Throwables for Laravel 5.0 parent compatibility.
|
||||
$exception = $e instanceof Exception ? $e : new \RuntimeException($e->getMessage(), $e->getCode());
|
||||
return parent::render($request, $exception);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -765,8 +765,7 @@ class UserController extends Controller
|
||||
|
||||
$u = $UserModel->insertNewProductThumbnails($thumbs);
|
||||
// var_dump($thumbs);
|
||||
Storage::disk('sftp')->put($thumbnail, fopen($request->file('imgupload')[$i], 'r+')); //live
|
||||
//Storage::disk('localdir')->put($thumbnail, fopen($request->file('imgupload')[$i], 'r+'));
|
||||
Storage::disk('minio_crewsportswear')->put('images/' . $thumbnail, fopen($request->file('imgupload')[$i], 'r+'));
|
||||
// var_dump($s);
|
||||
}
|
||||
|
||||
@@ -938,8 +937,7 @@ class UserController extends Controller
|
||||
);
|
||||
|
||||
$u = $UserModel->insertNewProductThumbnails($thumbs);
|
||||
Storage::disk('sftp')->put($thumbnail, fopen($request->file('upload_images')[$i], 'r+')); //live
|
||||
//Storage::disk('localdir')->put($thumbnail, fopen($request->file('upload_images')[$i], 'r+'));
|
||||
Storage::disk('minio_crewsportswear')->put('images/' . $thumbnail, fopen($request->file('upload_images')[$i], 'r+'));
|
||||
|
||||
}
|
||||
|
||||
@@ -961,6 +959,8 @@ class UserController extends Controller
|
||||
unlink($storagePath . $file);
|
||||
}
|
||||
|
||||
Storage::disk('minio_crewsportswear')->delete('images/' . $file);
|
||||
|
||||
$i = $UserModel->deleteImageThumb('Id', $id);
|
||||
|
||||
return response()->json(array(
|
||||
|
||||
@@ -4,6 +4,8 @@ use Illuminate\Support\ServiceProvider;
|
||||
use Illuminate\Support\Facades\Storage;
|
||||
use League\Flysystem\Filesystem;
|
||||
use League\Flysystem\Sftp\SftpAdapter;
|
||||
use League\Flysystem\AwsS3v3\AwsS3Adapter as AwsS3v3Adapter;
|
||||
use Aws\S3\S3Client;
|
||||
use Illuminate\Support\Facades\Blade;
|
||||
|
||||
class AppServiceProvider extends ServiceProvider {
|
||||
@@ -27,6 +29,21 @@ class AppServiceProvider extends ServiceProvider {
|
||||
Storage::extend('sftp', function ($app, $config) {
|
||||
return new Filesystem(new SftpAdapter($config));
|
||||
});
|
||||
|
||||
Storage::extend('minio', function ($app, $config) {
|
||||
$client = new S3Client([
|
||||
'credentials' => [
|
||||
'key' => $config['key'],
|
||||
'secret' => $config['secret'],
|
||||
],
|
||||
'region' => $config['region'],
|
||||
'version' => 'latest',
|
||||
'endpoint' => $config['endpoint'],
|
||||
'use_path_style_endpoint' => filter_var($config['use_path_style_endpoint'] ?? true, FILTER_VALIDATE_BOOLEAN),
|
||||
]);
|
||||
$adapter = new AwsS3v3Adapter($client, $config['bucket']);
|
||||
return new Filesystem($adapter);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
33
app/helpers.php
Normal file
33
app/helpers.php
Normal file
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
|
||||
if (!function_exists('minio_url')) {
|
||||
/**
|
||||
* Generate MinIO URL for a file.
|
||||
*
|
||||
* @param string $path File path relative to bucket
|
||||
* @return string Full MinIO URL
|
||||
*/
|
||||
function minio_url($path)
|
||||
{
|
||||
$bucket = env('MINIO_BUCKET', 'merchbay');
|
||||
$baseUrl = env('MINIO_URL', 'https://minio.crewsportswear.app');
|
||||
|
||||
// Remove leading slash if present
|
||||
$path = ltrim($path, '/');
|
||||
|
||||
return $baseUrl . '/' . $bucket . '/' . $path;
|
||||
}
|
||||
}
|
||||
|
||||
if (!function_exists('minio_image_url')) {
|
||||
/**
|
||||
* Generate MinIO URL for an image in uploads/images/.
|
||||
*
|
||||
* @param string $filename Image filename
|
||||
* @return string Full MinIO URL
|
||||
*/
|
||||
function minio_image_url($filename)
|
||||
{
|
||||
return minio_url('uploads/images/' . $filename);
|
||||
}
|
||||
}
|
||||
@@ -11,20 +11,26 @@
|
||||
"guzzlehttp/guzzle": "~5.0",
|
||||
"google/recaptcha": "~1.1",
|
||||
"spatie/laravel-analytics": "^1.4",
|
||||
"league/flysystem-sftp": "^1.0"
|
||||
"league/flysystem-sftp": "^1.0",
|
||||
"league/flysystem-aws-s3-v3": "~1.0",
|
||||
"aws/aws-sdk-php": "~3.0",
|
||||
"psr/http-message": "^1.0",
|
||||
"guzzlehttp/psr7": "^1.4"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "~4.0",
|
||||
"phpspec/phpspec": "~2.1"
|
||||
},
|
||||
|
||||
"autoload": {
|
||||
"classmap": [
|
||||
"database"
|
||||
],
|
||||
"psr-4": {
|
||||
"App\\": "app/"
|
||||
}
|
||||
},
|
||||
"files": [
|
||||
"app/helpers.php"
|
||||
]
|
||||
},
|
||||
"autoload-dev": {
|
||||
"classmap": [
|
||||
@@ -46,9 +52,6 @@
|
||||
]
|
||||
},
|
||||
"config": {
|
||||
"preferred-install": "dist",
|
||||
"allow-plugins": {
|
||||
"kylekatarnls/update-helper": true
|
||||
}
|
||||
"preferred-install": "dist"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -108,6 +108,28 @@ return [
|
||||
'driver' => 'local',
|
||||
'root' => 'C:/wamp64/www/uploads',
|
||||
],
|
||||
|
||||
'minio' => [
|
||||
'driver' => 'minio',
|
||||
'key' => env('MINIO_KEY'),
|
||||
'secret' => env('MINIO_SECRET'),
|
||||
'region' => env('MINIO_REGION', 'us-east-1'),
|
||||
'bucket' => env('MINIO_BUCKET', 'merchbay'),
|
||||
'endpoint' => env('MINIO_ENDPOINT'),
|
||||
'use_path_style_endpoint' => env('MINIO_USE_PATH_STYLE', true),
|
||||
'url' => env('MINIO_URL', 'https://minio.crewsportswear.app'),
|
||||
],
|
||||
|
||||
'minio_crewsportswear' => [
|
||||
'driver' => 'minio',
|
||||
'key' => env('MINIO_KEY'),
|
||||
'secret' => env('MINIO_SECRET'),
|
||||
'region' => env('MINIO_REGION', 'us-east-1'),
|
||||
'bucket' => 'crewsportswear',
|
||||
'endpoint' => env('MINIO_ENDPOINT'),
|
||||
'use_path_style_endpoint' => env('MINIO_USE_PATH_STYLE', true),
|
||||
'url' => env('MINIO_URL', 'https://minio.crewsportswear.app'),
|
||||
],
|
||||
],
|
||||
|
||||
];
|
||||
|
||||
@@ -20,6 +20,7 @@ return [
|
||||
'prod_private_server_ip' => env('PROD_PRIVATE'),
|
||||
// 'images_url' => env('https://crewsportswear.app:5955', 'https://crewsportswear.app:5955'),
|
||||
'images_url' => env('IMAGES_URL'),
|
||||
'minio_url' => env('MINIO_URL', 'https://minio.crewsportswear.app/merchbay'),
|
||||
// 'uploads' => env('https://crewsportswear.app:5955/merchbay/', 'https://crewsportswear.com/uploads/images/'), // local
|
||||
'uploads' => env('UPLOAD_URL'),
|
||||
|
||||
|
||||
@@ -1,3 +1,19 @@
|
||||
# ─────────────────────────────────────────────────────────────────────────────
|
||||
# Local development stack
|
||||
#
|
||||
# Default (local MariaDB):
|
||||
# docker compose --env-file .env.local -f docker-compose.local.yml up --build
|
||||
#
|
||||
# Remote DB via SSH private-key tunnel:
|
||||
# 1. Set SSH_HOST, SSH_USER, SSH_KEY_PATH, SSH_DB_REMOTE_HOST,
|
||||
# SSH_DB_REMOTE_PORT (and DB_* creds) in .env.local
|
||||
# 2. docker compose --env-file .env.local -f docker-compose.local.yml --profile ssh-db up --build
|
||||
# The app will talk to db-tunnel (port 3306) instead of the local db.
|
||||
#
|
||||
# App: http://localhost:8080
|
||||
# phpMyAdmin: http://localhost:8081
|
||||
# ─────────────────────────────────────────────────────────────────────────────
|
||||
|
||||
services:
|
||||
db:
|
||||
image: mariadb:10.6
|
||||
@@ -5,10 +21,10 @@ services:
|
||||
container_name: merchbay_db_local
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
MYSQL_DATABASE: merchbay
|
||||
MYSQL_DATABASE: ${DB_DATABASE:-merchbay_db}
|
||||
MYSQL_ROOT_PASSWORD: root
|
||||
MYSQL_USER: merchbay
|
||||
MYSQL_PASSWORD: secret
|
||||
MYSQL_USER: ${DB_USERNAME:-merchbay}
|
||||
MYSQL_PASSWORD: ${DB_PASSWORD:-secret}
|
||||
ports:
|
||||
- "3306:3306"
|
||||
volumes:
|
||||
@@ -29,14 +45,14 @@ services:
|
||||
- APP_DEBUG=true
|
||||
- APP_URL=http://localhost:8080
|
||||
- DB_CONNECTION=mysql
|
||||
- DB_HOST=db
|
||||
- DB_PORT=3306
|
||||
- DB_DATABASE=merchbay
|
||||
- DB_USERNAME=merchbay
|
||||
- DB_PASSWORD=secret
|
||||
- DB_HOST=${DB_HOST:-db}
|
||||
- DB_PORT=${DB_PORT:-3306}
|
||||
- DB_DATABASE=${DB_DATABASE:-merchbay_db}
|
||||
- DB_USERNAME=${DB_USERNAME:-merchbay}
|
||||
- DB_PASSWORD=${DB_PASSWORD:-secret}
|
||||
- PROD_PRIVATE=http://localhost:8080
|
||||
- IMAGES_URL=http://localhost:8080
|
||||
- UPLOAD_URL=http://localhost:8080/uploads/
|
||||
- IMAGES_URL=${IMAGES_URL:-https://minio.crewsportswear.app/merchbay}
|
||||
- UPLOAD_URL=${UPLOAD_URL:-https://minio.crewsportswear.app/merchbay/uploads/}
|
||||
- MAIL_DRIVER=log
|
||||
- MAIL_HOST=localhost
|
||||
- MAIL_PORT=1025
|
||||
@@ -48,15 +64,67 @@ services:
|
||||
- ANALYTICS_SITE_ID=
|
||||
- ANALYTICS_CLIENT_ID=
|
||||
- ANALYTICS_SERVICE_EMAIL=
|
||||
# MinIO S3 Storage (connect to production MinIO for testing)
|
||||
- MINIO_ENDPOINT=https://minio.crewsportswear.app
|
||||
- MINIO_KEY=${MINIO_KEY:-minioadmin}
|
||||
- MINIO_SECRET=${MINIO_SECRET:-minioadmin}
|
||||
- MINIO_BUCKET=merchbay
|
||||
- MINIO_REGION=us-east-1
|
||||
- MINIO_USE_PATH_STYLE=false
|
||||
- MINIO_URL=https://minio.crewsportswear.app
|
||||
env_file:
|
||||
- path: .env.local
|
||||
required: false
|
||||
volumes:
|
||||
- ./:/var/www/html
|
||||
- ./storage:/var/www/html/storage
|
||||
- ./public/uploads:/var/www/html/public/uploads
|
||||
# Keep the vendor/ directory from the image — prevents the bind-mount
|
||||
# from wiping out the composer install done during docker build.
|
||||
- vendor_local:/var/www/html/vendor
|
||||
depends_on:
|
||||
- db
|
||||
networks:
|
||||
- merchbay-local
|
||||
|
||||
# ── SSH tunnel to a remote database ────────────────────────────────────────
|
||||
# Activated only with: --profile ssh-db
|
||||
# Requires SSH_HOST, SSH_USER, SSH_KEY_PATH (and optionally SSH_PORT,
|
||||
# SSH_DB_REMOTE_HOST, SSH_DB_REMOTE_PORT) set in .env.local.
|
||||
db-tunnel:
|
||||
profiles:
|
||||
- ssh-db
|
||||
image: alpine:3.19
|
||||
container_name: merchbay_db_tunnel
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
- SSH_HOST=${SSH_HOST}
|
||||
- SSH_PORT=${SSH_PORT:-22}
|
||||
- SSH_USER=${SSH_USER:-root}
|
||||
- SSH_DB_REMOTE_HOST=${SSH_DB_REMOTE_HOST:-127.0.0.1}
|
||||
- SSH_DB_REMOTE_PORT=${SSH_DB_REMOTE_PORT:-3306}
|
||||
volumes:
|
||||
- ${SSH_KEY_PATH:-~/.ssh/id_rsa}:/ssh/id_rsa:ro
|
||||
command:
|
||||
- sh
|
||||
- -c
|
||||
- |
|
||||
apk add --no-cache openssh-client
|
||||
cp /ssh/id_rsa /tmp/id_rsa
|
||||
chmod 600 /tmp/id_rsa
|
||||
echo "Starting SSH tunnel to $$SSH_HOST..."
|
||||
exec ssh -N \
|
||||
-o StrictHostKeyChecking=no \
|
||||
-o ServerAliveInterval=30 \
|
||||
-o ServerAliveCountMax=3 \
|
||||
-o ExitOnForwardFailure=yes \
|
||||
-i /tmp/id_rsa \
|
||||
-L "0.0.0.0:3306:$$SSH_DB_REMOTE_HOST:$$SSH_DB_REMOTE_PORT" \
|
||||
-p "$$SSH_PORT" \
|
||||
"$$SSH_USER@$$SSH_HOST"
|
||||
networks:
|
||||
- merchbay-local
|
||||
|
||||
phpmyadmin:
|
||||
image: arm64v8/phpmyadmin
|
||||
platform: linux/arm64
|
||||
@@ -79,3 +147,4 @@ networks:
|
||||
|
||||
volumes:
|
||||
db_data:
|
||||
vendor_local:
|
||||
|
||||
@@ -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({
|
||||
|
||||
@@ -455,7 +455,7 @@
|
||||
@foreach ($img_thumb as $img)
|
||||
@if ($img->ProductId == $item->ProductId)
|
||||
<img style="height: 200px; overflow: hidden; object-fit: contain;"
|
||||
src="{{ config('site_config.images_url') }}/{{ $img->Image }}">
|
||||
src="{{ config('filesystems.disks.minio.url') }}/crewsportswear/images/{{ $img->Image }}">
|
||||
@endif
|
||||
@endforeach
|
||||
</td>
|
||||
|
||||
@@ -63,7 +63,7 @@
|
||||
<div class="col-md-8 col-md-pull-4">
|
||||
<div style="border: 1px solid #e2e2e2; padding: 10px;">
|
||||
<h6><img height="30px" class="cart-store-logo"
|
||||
src="{{ config('site_config.uploads') .'teamstore/' .$store_array[0]->ImageFolder .'/' .$store_array[0]->StoreLogo }}">
|
||||
src="{{ minio_url('teamstore/' . $store_array[0]->ImageFolder . '/' . $store_array[0]->StoreLogo) }}">
|
||||
{{ $store_array[0]->StoreName }}
|
||||
</h6>
|
||||
</div>
|
||||
@@ -76,7 +76,7 @@
|
||||
@foreach ($img_thumb as $img)
|
||||
@if ($img->ProductId == $item->ProductId)
|
||||
<img class="previewImage"
|
||||
src="{{ config('site_config.images_url') }}/{{ $img->Image }}">
|
||||
src="{{ config('filesystems.disks.minio.url') }}/crewsportswear/images/{{ $img->Image }}">
|
||||
@endif
|
||||
@endforeach
|
||||
</div>
|
||||
|
||||
@@ -73,9 +73,9 @@
|
||||
<a href="{{ url('store') }}/{{ $carousel->StoreUrl }}">
|
||||
<div class="top-image">
|
||||
<img
|
||||
src="{{ config('site_config.uploads') . 'teamstore/' . $carousel->ImageFolder . '/' . $carousel->StoreBanner }}" />
|
||||
src="{{ minio_url('teamstore/' . $carousel->ImageFolder . '/' . $carousel->StoreBanner) }}" />
|
||||
</div>
|
||||
<img src="{{ config('site_config.uploads') . 'teamstore/' . $carousel->ImageFolder . '/' . $carousel->StoreBanner }}"
|
||||
<img src="{{ minio_url('teamstore/' . $carousel->ImageFolder . '/' . $carousel->StoreBanner) }}"
|
||||
class="blurred" />
|
||||
</a>
|
||||
</div>
|
||||
@@ -84,9 +84,9 @@
|
||||
<a href="{{ url('store') }}/{{ $carousel->StoreUrl }}">
|
||||
<div class="top-image">
|
||||
<img
|
||||
src="{{ config('site_config.uploads') . 'teamstore/' . $carousel->ImageFolder . '/' . $carousel->StoreBanner }}" />
|
||||
src="{{ minio_url('teamstore/' . $carousel->ImageFolder . '/' . $carousel->StoreBanner) }}" />
|
||||
</div>
|
||||
<img src="{{ config('site_config.uploads') . 'teamstore/' . $carousel->ImageFolder . '/' . $carousel->StoreBanner }}"
|
||||
<img src="{{ minio_url('teamstore/' . $carousel->ImageFolder . '/' . $carousel->StoreBanner) }}"
|
||||
class="blurred" />
|
||||
</a>
|
||||
</div>
|
||||
@@ -167,7 +167,7 @@
|
||||
<div class="text-center p-3">
|
||||
<a href="{{ url('store') . '/' . $product->StoreUrl . '/product/' . $product->ProductURL }}">
|
||||
<div class="store-logo">
|
||||
<img src="{{ config('site_config.images_url') . '/' . $product->Image }}"
|
||||
<img src="{{ config('filesystems.disks.minio.url') }}/crewsportswear/images/{{ $product->Image }}"
|
||||
alt="{{ $product->ProductName }}" class="d-block border shadow-sm">
|
||||
</div>
|
||||
<div class="store-name text-truncate">{{ $product->ProductName }}</div>
|
||||
|
||||
@@ -64,7 +64,7 @@
|
||||
<table class="table">
|
||||
|
||||
<tr>
|
||||
<td rowspan="2" class="text-center"><img class="previewImage" src="http://{{ config('site_config.images_url') }}/{{ $item->Image }} "></td>
|
||||
<td rowspan="2" class="text-center"><img class="previewImage" src="{{ config('filesystems.disks.minio.url') }}/crewsportswear/images/{{ $item->Image }}"></td>
|
||||
<td colspan="5">
|
||||
<h4>{{ $item->ProductName }} {{ $itemOrder }} <br>Price: ${{ $item->Price }}</h4>
|
||||
</td>
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
<div class="row">
|
||||
<div class="col-lg-12 text-center">
|
||||
<div class="store-banner border-top">
|
||||
<img src="{{ config('site_config.uploads') .'teamstore/' .$store_array[0]->ImageFolder .'/' .$store_array[0]->StoreBanner }}"
|
||||
<img src="{{ minio_url('teamstore/' . $store_array[0]->ImageFolder . '/' . $store_array[0]->StoreBanner) }}"
|
||||
id="storeBanner" class="shadow-sm img-fluid w-100" alt="{{ $store_array[0]->StoreName }}" />
|
||||
</div>
|
||||
</div>
|
||||
@@ -130,7 +130,7 @@
|
||||
<a
|
||||
href="{{ url('store') }}/{{ $store_array[0]->StoreUrl }}/product/{{ $product->ProductURL }}">
|
||||
<div class="product-image">
|
||||
<img src="{{ config('site_config.images_url') }}/{{ $filename }}"
|
||||
<img src="{{ config('filesystems.disks.minio.url') }}/crewsportswear/images/{{ $filename }}"
|
||||
class="d-block border shadow-sm" alt="{{ $product->ProductName }}" />
|
||||
</div>
|
||||
</a>
|
||||
|
||||
@@ -270,7 +270,7 @@
|
||||
<div class="row">
|
||||
<div class="col-lg-12 text-center">
|
||||
<div class="store-banner border-top">
|
||||
<img src="{{ config('site_config.uploads') .'teamstore/' .$store_array[0]->ImageFolder .'/' .$store_array[0]->StoreBanner }}"
|
||||
<img src="{{ minio_url('teamstore/' . $store_array[0]->ImageFolder . '/' . $store_array[0]->StoreBanner) }}"
|
||||
id="storeBanner" class="shadow-sm img-fluid w-100" alt="..." />
|
||||
</div>
|
||||
</div>
|
||||
@@ -308,13 +308,13 @@
|
||||
<div data-bs-target="#demo" data-bs-slide-to="{{ $i }}"
|
||||
class="item active">
|
||||
<img
|
||||
src="{{ config('site_config.images_url') }}/{{ $thumbnail->Image }}" />
|
||||
src="{{ config('filesystems.disks.minio.url') }}/crewsportswear/images/{{ $thumbnail->Image }}" />
|
||||
</div>
|
||||
@else
|
||||
<div data-bs-target="#demo" data-bs-slide-to="{{ $i }}"
|
||||
class="item">
|
||||
<img
|
||||
src="{{ config('site_config.images_url') }}/{{ $thumbnail->Image }}" />
|
||||
src="{{ config('filesystems.disks.minio.url') }}/crewsportswear/images/{{ $thumbnail->Image }}" />
|
||||
</div>
|
||||
@endif
|
||||
@define $i++
|
||||
@@ -330,12 +330,12 @@
|
||||
@foreach ($thumbnails_array as $thumbnail)
|
||||
@if ($j == 0)
|
||||
<div class="carousel-item active">
|
||||
<img src="{{ config('site_config.images_url') }}/{{ $thumbnail->Image }}"
|
||||
<img src="{{ config('filesystems.disks.minio.url') }}/crewsportswear/images/{{ $thumbnail->Image }}"
|
||||
class="img-fluid" />
|
||||
</div>
|
||||
@else
|
||||
<div class="carousel-item">
|
||||
<img src="{{ config('site_config.images_url') }}/{{ $thumbnail->Image }}"
|
||||
<img src="{{ config('filesystems.disks.minio.url') }}/crewsportswear/images/{{ $thumbnail->Image }}"
|
||||
class="img-fluid" />
|
||||
</div>
|
||||
@endif
|
||||
@@ -394,7 +394,7 @@
|
||||
<a
|
||||
href="{{ url('store') . '/' . $product->StoreUrl . '/product/' . $product->ProductURL }}">
|
||||
<div class="store-logo">
|
||||
<img src="{{ config('site_config.images_url') . '/' . $product->Image }}"
|
||||
<img src="{{ config('filesystems.disks.minio.url') }}/crewsportswear/images/{{ $product->Image }}"
|
||||
alt="{{ $product->ProductName }}" class="d-block border shadow-sm">
|
||||
</div>
|
||||
<div class="store-name text-truncate">{{ $product->ProductName }}</div>
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
<a href="#">
|
||||
<div class="store-logo password-protected" data-store-id="{{ $store->Id }}"
|
||||
data-store-url="{{ $store->StoreUrl }}">
|
||||
<img src="{{ config('site_config.uploads') . 'teamstore/' . $store->ImageFolder . '/' . $store->StoreLogo }}"
|
||||
<img src="{{ minio_url('teamstore/' . $store->ImageFolder . '/' . $store->StoreLogo) }}"
|
||||
class="d-block" alt="{{ $store->StoreName }}" />
|
||||
<div class="store-locked">
|
||||
<i class="fa fa-lock"></i>
|
||||
@@ -29,7 +29,7 @@
|
||||
@else
|
||||
<a href="{{ url('store') . '/' . $store->StoreUrl }}">
|
||||
<div class="store-logo">
|
||||
<img src="{{ config('site_config.uploads') . 'teamstore/' . $store->ImageFolder . '/' . $store->StoreLogo }}"
|
||||
<img src="{{ minio_url('teamstore/' . $store->ImageFolder . '/' . $store->StoreLogo) }}"
|
||||
class="d-block" alt="{{ $store->StoreName }}" />
|
||||
</div>
|
||||
<div class="store-name">{{ $store->StoreName }}</div>
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
@foreach($array_client_designs as $row)
|
||||
@foreach($array_template_paths as $key => $row1)
|
||||
@if($key == 0)
|
||||
<img src="{{ config('site_config.images_url') }}/{{ $row->DesignCode }}-front-thumbnail.png" alt="{{ $row->DesignName }}" id="main-thumbnail" class="img img-responsive">
|
||||
<img src="{{ config('filesystems.disks.minio.url') }}/crewsportswear/images/{{ $row->DesignCode }}-front-thumbnail.png" alt="{{ $row->DesignName }}" id="main-thumbnail" class="img img-responsive">
|
||||
@endif
|
||||
@endforeach
|
||||
@endforeach
|
||||
@@ -56,7 +56,7 @@
|
||||
@if($key == 0)
|
||||
<li class="col-sm-3 col-xs-3">
|
||||
<a class="thumbnail a_thumbnail active">
|
||||
<img class="img img-responsive product-center image-thumbnails" style="height: 59.45px;" src="{{ config('site_config.images_url') }}/{{ $row->DesignCode }}-front-thumbnail.png"/>
|
||||
<img class="img img-responsive product-center image-thumbnails" style="height: 59.45px;" src="{{ config('filesystems.disks.minio.url') }}/crewsportswear/images/{{ $row->DesignCode }}-front-thumbnail.png"/>
|
||||
</a>
|
||||
<!-- <p>Select Default Thumbnail:</p>
|
||||
<div class="text-center">
|
||||
@@ -66,7 +66,7 @@
|
||||
@else
|
||||
<li class="col-sm-3 col-xs-3">
|
||||
<a class="thumbnail a_thumbnail">
|
||||
<img class="img img-responsive product-center image-thumbnails" style="height: 59.45px;" src="{{ config('site_config.images_url') }}/{{ $row->DesignCode }}-{{ strtolower($row1->Side) }}-thumbnail.png"/>
|
||||
<img class="img img-responsive product-center image-thumbnails" style="height: 59.45px;" src="{{ config('filesystems.disks.minio.url') }}/crewsportswear/images/{{ $row->DesignCode }}-{{ strtolower($row1->Side) }}-thumbnail.png"/>
|
||||
</a>
|
||||
<!-- <p> </p>
|
||||
<div class="text-center">
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
<!-- Control Sidebar Toggle Button -->
|
||||
<li class="user user-menu">
|
||||
<a href="#">
|
||||
<img src="{{ config('site_config.uploads') . 'user/default-user.png' }}" class="user-image" alt="User Image">
|
||||
<img src="{{ minio_url('user/default-user.png') }}" class="user-image" alt="User Image">
|
||||
<span class="hidden-xs">{{ Auth::user()->username }}</span>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
@foreach($array_client_designs as $row)
|
||||
<div class="col-md-3 col-sm-6">
|
||||
<span class="thumbnail">
|
||||
<img src="{{ config('site_config.images_url') }}/{{ $row->DesignCode }}-front-thumbnail.png" alt="{{ $row->DesignName }}">
|
||||
<img src="{{ config('filesystems.disks.minio.url') }}/crewsportswear/images/{{ $row->DesignCode }}-front-thumbnail.png" alt="{{ $row->DesignName }}">
|
||||
<h4 class="design-name-holder">{{ $row->DesignName }}</h4>
|
||||
<small>{{ date('F j, Y g:i a', strtotime($row->DateCreated)) }}</small>
|
||||
<hr class="line">
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
<div class="row">
|
||||
<div class="col-md-2">
|
||||
<div class="text-center">
|
||||
<img class="previewImage" id="active_thumbnail" src="{{ config('site_config.images_url') . '/' . $array_thumbnail_display[0]->Image }}">
|
||||
<img class="previewImage" id="active_thumbnail" src="{{ config('filesystems.disks.minio.url') }}/crewsportswear/images/{{ $array_thumbnail_display[0]->Image }}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-10">
|
||||
|
||||
@@ -93,7 +93,7 @@
|
||||
<div class="text-center">
|
||||
@foreach($img_thumb as $img)
|
||||
@if($img->ProductId == $item->ProductId)
|
||||
<img class="previewImage" src="{{ config('site_config.images_url') }}/{{ $img->Image }}">
|
||||
<img class="previewImage" src="{{ config('filesystems.disks.minio.url') }}/crewsportswear/images/{{ $img->Image }}">
|
||||
@endif
|
||||
@endforeach
|
||||
</div>
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
@foreach($array_client_designs as $row)
|
||||
@foreach($array_template_paths as $key => $row1)
|
||||
@if($key == 0)
|
||||
<img src="{{ config('site_config.images_url') }}/{{ $row->DesignCode }}-front-thumbnail.png" alt="{{ $row->DesignName }}" id="main-thumbnail" class="img img-responsive">
|
||||
<img src="{{ config('filesystems.disks.minio.url') }}/crewsportswear/images/{{ $row->DesignCode }}-front-thumbnail.png" alt="{{ $row->DesignName }}" id="main-thumbnail" class="img img-responsive">
|
||||
@endif
|
||||
@endforeach
|
||||
@endforeach
|
||||
@@ -56,7 +56,7 @@
|
||||
@if($key == 0)
|
||||
<li class="col-sm-3 col-xs-3">
|
||||
<a class="thumbnail a_thumbnail active">
|
||||
<img class="img img-responsive product-center image-thumbnails" style="height: 59.45px;" src="{{ config('site_config.images_url') }}/{{ $row->DesignCode }}-front-thumbnail.png"/>
|
||||
<img class="img img-responsive product-center image-thumbnails" style="height: 59.45px;" src="{{ config('filesystems.disks.minio.url') }}/crewsportswear/images/{{ $row->DesignCode }}-front-thumbnail.png"/>
|
||||
</a>
|
||||
<!-- <p>Select Default Thumbnail:</p>
|
||||
<div class="text-center">
|
||||
@@ -66,7 +66,7 @@
|
||||
@else
|
||||
<li class="col-sm-3 col-xs-3">
|
||||
<a class="thumbnail a_thumbnail">
|
||||
<img class="img img-responsive product-center image-thumbnails" style="height: 59.45px;" src="{{ config('site_config.images_url') }}/{{ $row->DesignCode }}-{{ strtolower($row1->Side) }}-thumbnail.png"/>
|
||||
<img class="img img-responsive product-center image-thumbnails" style="height: 59.45px;" src="{{ config('filesystems.disks.minio.url') }}/crewsportswear/images/{{ $row->DesignCode }}-{{ strtolower($row1->Side) }}-thumbnail.png"/>
|
||||
</a>
|
||||
<!-- <p> </p>
|
||||
<div class="text-center">
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<!-- Sidebar user panel -->
|
||||
<div class="user-panel">
|
||||
<div class="pull-left image">
|
||||
<img src="{{ config('site_config.uploads') . 'user/default-user.png' }}" class="img-circle" alt="User Image">
|
||||
<img src="{{ minio_url('user/default-user.png') }}" class="img-circle" alt="User Image">
|
||||
</div>
|
||||
<div class="pull-left info">
|
||||
<p>{{ Auth::user()->name }}</p>
|
||||
|
||||
@@ -59,7 +59,7 @@
|
||||
<div class="col-md-3 col-sm-6">
|
||||
<div class="thumbnail" >
|
||||
<a href="{{ url('user/store-items/item') }}/{{ $product->ProductURL }}">
|
||||
<img style="height:200px" src="{{ config('site_config.images_url') }}/{{ $filename . '?t=' . time() }}" alt="{{ $product->ProductName }}" >
|
||||
<img style="height:200px" src="{{ config('filesystems.disks.minio.url') }}/crewsportswear/images/{{ $filename . '?t=' . time() }}" alt="{{ $product->ProductName }}" >
|
||||
</a>
|
||||
<hr class="line">
|
||||
<div class="pull-right">
|
||||
|
||||
@@ -63,7 +63,7 @@
|
||||
<div id="{{ 'order_number_' . $product->Id }}">
|
||||
<div class="thumbnail" >
|
||||
<a href="#">
|
||||
<img style="height:200px" src="{{ config('site_config.images_url') }}/{{ $filename . '?t=' . time() }}" alt="{{ $product->ProductName }}" >
|
||||
<img style="height:200px" src="{{ config('filesystems.disks.minio.url') }}/crewsportswear/images/{{ $filename . '?t=' . time() }}" alt="{{ $product->ProductName }}" >
|
||||
</a>
|
||||
<hr class="line">
|
||||
<div class="pull-right">
|
||||
|
||||
@@ -63,8 +63,8 @@
|
||||
<div class="col-sm-8">
|
||||
<p>Store Logo Preview:</p>
|
||||
<div class="store-logo-holder">
|
||||
<a href="{{ config('site_config.uploads') . 'teamstore/' . $store_array[0]->ImageFolder . '/' . $store_array[0]->StoreLogo }}?v={{ time() }}" class="img_store_logo_href" data-toggle="lightbox">
|
||||
<img class="img_store_logo_img" id="img_store_logo" src="{{ config('site_config.uploads') . 'teamstore/' . $store_array[0]->ImageFolder . '/' . $store_array[0]->StoreLogo }}?v={{ time() }}" style="max-width: 100%; max-height: 100%; ">
|
||||
<a href="{{ minio_url('teamstore/' . $store_array[0]->ImageFolder . '/' . $store_array[0]->StoreLogo) }}?v={{ time() }}" class="img_store_logo_href" data-toggle="lightbox">
|
||||
<img class="img_store_logo_img" id="img_store_logo" src="{{ minio_url('teamstore/' . $store_array[0]->ImageFolder . '/' . $store_array[0]->StoreLogo) }}?v={{ time() }}" style="max-width: 100%; max-height: 100%; ">
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
@@ -82,8 +82,8 @@
|
||||
<div class="col-sm-8">
|
||||
<p>Store Banner Preview:</p>
|
||||
<div class="store-banner-holder">
|
||||
<a href="{{ config('site_config.uploads') . 'teamstore/' . $store_array[0]->ImageFolder . '/' . $store_array[0]->StoreBanner }}?v={{ time() }}" class="img_store_banner_href" data-toggle="lightbox">
|
||||
<img class="img_store_banner_img" id="img_store_banner" src="{{ config('site_config.uploads') . 'teamstore/' . $store_array[0]->ImageFolder . '/' . $store_array[0]->StoreBanner }}?v={{ time() }}" style="max-width: 100%; max-height: 100%;">
|
||||
<a href="{{ minio_url('teamstore/' . $store_array[0]->ImageFolder . '/' . $store_array[0]->StoreBanner) }}?v={{ time() }}" class="img_store_banner_href" data-toggle="lightbox">
|
||||
<img class="img_store_banner_img" id="img_store_banner" src="{{ minio_url('teamstore/' . $store_array[0]->ImageFolder . '/' . $store_array[0]->StoreBanner) }}?v={{ time() }}" style="max-width: 100%; max-height: 100%;">
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
@foreach($array_client_designs as $row)
|
||||
@foreach($array_template_paths as $key => $row1)
|
||||
@if($key == 0)
|
||||
<img src="{{ config('site_config.images_url') }}/{{ $row->DesignCode }}-front-thumbnail.png" alt="{{ $row->DesignName }}" id="main-thumbnail" class="img img-responsive">
|
||||
<img src="{{ config('filesystems.disks.minio.url') }}/crewsportswear/images/{{ $row->DesignCode }}-front-thumbnail.png" alt="{{ $row->DesignName }}" id="main-thumbnail" class="img img-responsive">
|
||||
@endif
|
||||
@endforeach
|
||||
@endforeach
|
||||
@@ -53,13 +53,13 @@
|
||||
@if($key == 0)
|
||||
<li class="col-sm-3 col-xs-3">
|
||||
<a class="thumbnail a_thumbnail active">
|
||||
<img class="img img-responsive product-center image-thumbnails" style="height: 59.45px;" src="{{ config('site_config.images_url') }}/{{ $row->DesignCode }}-front-thumbnail.png"/>
|
||||
<img class="img img-responsive product-center image-thumbnails" style="height: 59.45px;" src="{{ config('filesystems.disks.minio.url') }}/crewsportswear/images/{{ $row->DesignCode }}-front-thumbnail.png"/>
|
||||
</a>
|
||||
</li>
|
||||
@else
|
||||
<li class="col-sm-3 col-xs-3">
|
||||
<a class="thumbnail a_thumbnail">
|
||||
<img class="img img-responsive product-center image-thumbnails" style="height: 59.45px;" src="{{ config('site_config.images_url') }}/{{ $row->DesignCode }}-{{ strtolower($row1->Side) }}-thumbnail.png"/>
|
||||
<img class="img img-responsive product-center image-thumbnails" style="height: 59.45px;" src="{{ config('filesystems.disks.minio.url') }}/crewsportswear/images/{{ $row->DesignCode }}-{{ strtolower($row1->Side) }}-thumbnail.png"/>
|
||||
</a>
|
||||
</li>
|
||||
@endif
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
@foreach ($thumbnails_array as $thumbnail)
|
||||
@if ($thumbnail->ImageClass == 'active')
|
||||
<img style="height:400px"
|
||||
src="{{ config('site_config.images_url') }}/{{ $thumbnail->Image . '?t=' . time() }}"
|
||||
src="{{ config('filesystems.disks.minio.url') }}/crewsportswear/images/{{ $thumbnail->Image . '?t=' . time() }}"
|
||||
id="main-thumbnail">
|
||||
@endif
|
||||
@endforeach
|
||||
@@ -71,7 +71,7 @@
|
||||
<!-- <span class="close">×</span> -->
|
||||
<img class="img img-responsive product-center image-thumbnails"
|
||||
style="height: 59.45px;"
|
||||
src="{{ config('site_config.images_url') }}/{{ $thumbnail->Image . '?t=' . time() }}" />
|
||||
src="{{ config('filesystems.disks.minio.url') }}/crewsportswear/images/{{ $thumbnail->Image . '?t=' . time() }}" />
|
||||
</a>
|
||||
<div class="funkyradio">
|
||||
<div class="funkyradio-primary">
|
||||
@@ -284,7 +284,7 @@
|
||||
<tr id="{{ 'item-' . $thumbnail->Id }}">
|
||||
<td class="text-center" style="width: 50px"><i class="fa fa-bars"></i></td>
|
||||
<td><img class="img img-responsive product-center" style="height: 59.45px;"
|
||||
src="{{ config('site_config.images_url') }}/{{ $thumbnail->Image . '?t=' . time() }}" />
|
||||
src="{{ config('filesystems.disks.minio.url') }}/crewsportswear/images/{{ $thumbnail->Image . '?t=' . time() }}" />
|
||||
</td>
|
||||
<td class="text-center">
|
||||
<!-- <button class="btn btn-default btn-xs btn-edit-clipart" data-id="#"><i class="fa fa-edit"></i></button> -->
|
||||
|
||||
Reference in New Issue
Block a user