Compare commits
97 Commits
v5.0-basel
...
49921a26a9
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
49921a26a9 | ||
|
|
3b6e0ec447 | ||
|
|
c16203110b | ||
|
|
60fcf08cbc | ||
|
|
701a433174 | ||
|
|
47b354d8b7 | ||
|
|
dfdb48920d | ||
|
|
3dac8ee685 | ||
|
|
09974721f3 | ||
|
|
8215ad8337 | ||
|
|
368ac50729 | ||
|
|
8f094ee89c | ||
|
|
0551cb078f | ||
|
|
26620fc043 | ||
|
|
f10d6daa6f | ||
|
|
ab0d370225 | ||
|
|
ee7b52feb2 | ||
|
|
4cb77e9312 | ||
|
|
43e66c7ac4 | ||
|
|
685a49cf57 | ||
|
|
f6617f6d70 | ||
|
|
7c6108e0a7 | ||
|
|
b8aa48a0bb | ||
|
|
8fc0b1076a | ||
|
|
71e1fca6fe | ||
|
|
8dc23e4e67 | ||
|
|
729d0e72e6 | ||
|
|
0b8856d3a0 | ||
|
|
6aa0587a69 | ||
|
|
08c274f5bd | ||
|
|
148df27117 | ||
|
|
e552037e2c | ||
|
|
7011b28542 | ||
|
|
2ac9cb6420 | ||
|
|
9c403b7207 | ||
|
|
11960d6bad | ||
|
|
25f80cb16f | ||
|
|
72773a517a | ||
|
|
d1f5d38480 | ||
|
|
f5f1693f55 | ||
|
|
39165cc7f9 | ||
|
|
20b4e06ee7 | ||
|
|
18e11ac3d0 | ||
|
|
0013b2a025 | ||
|
|
acf9c2e931 | ||
|
|
c144810352 | ||
|
|
b1ed52f7a6 | ||
|
|
70b250a64e | ||
|
|
1eb7e6632f | ||
|
|
98e7652e6b | ||
|
|
852593ecfb | ||
|
|
43de35a66c | ||
|
|
ad57e218af | ||
|
|
d2a20c4831 | ||
|
|
36ad67a37a | ||
|
|
6c55194c9a | ||
|
|
77ee1b9ccc | ||
|
|
6cc68cd56b | ||
|
|
3e328b83a4 | ||
|
|
d82832043c | ||
|
|
da89856e95 | ||
|
|
bf88584dcd | ||
|
|
3eb4078d19 | ||
|
|
5918eded8c | ||
|
|
02361ca64e | ||
|
|
1ca40ce1d7 | ||
|
|
59e52125f7 | ||
|
|
bb139cb0df | ||
|
|
bca94e54cc | ||
|
|
e57209bc64 | ||
|
|
5eeefa5587 | ||
|
|
80094cfdf0 | ||
|
|
587819be9a | ||
|
|
67b52fcc1a | ||
|
|
f7b402fe7a | ||
|
|
8408695473 | ||
|
|
99f89a968b | ||
|
|
3f96f82090 | ||
|
|
942af1f0a8 | ||
|
|
4610fb526b | ||
|
|
c29936f6b9 | ||
|
|
7c12b0e2bf | ||
|
|
a5dab36a14 | ||
|
|
55f135f66c | ||
|
|
6631690f93 | ||
|
|
dd26b1dd4b | ||
|
|
155bc2ce53 | ||
|
|
ef81f0bf25 | ||
|
|
bf078c82bf | ||
|
|
2e29677b90 | ||
|
|
03ea4e84a2 | ||
|
|
3f8c116293 | ||
|
|
9bf1a888a6 | ||
|
|
542f2c64e0 | ||
|
|
1d4c9a5445 | ||
|
|
3698312664 | ||
|
|
a9145ea484 |
6
.env.local
Normal file
6
.env.local
Normal file
@@ -0,0 +1,6 @@
|
||||
# Local Development MinIO Configuration
|
||||
# Copy to .env.local and update with your MinIO credentials
|
||||
|
||||
# MinIO credentials (get from your production server)
|
||||
MINIO_KEY=secret_key
|
||||
MINIO_SECRET=your_minio_root_password
|
||||
11
.gitignore
vendored
11
.gitignore
vendored
@@ -1,3 +1,14 @@
|
||||
/vendor
|
||||
/node_modules
|
||||
.env
|
||||
|
||||
# SSH Keys - Never commit private keys
|
||||
*.ppk
|
||||
*.pem
|
||||
*.key
|
||||
id_rsa
|
||||
id_dsa
|
||||
id_ecdsa
|
||||
id_ed25519
|
||||
_key/
|
||||
.ssh/
|
||||
|
||||
125
SSH_KEYS_SETUP.md
Normal file
125
SSH_KEYS_SETUP.md
Normal file
@@ -0,0 +1,125 @@
|
||||
# SSH Keys Setup Guide
|
||||
|
||||
## Security Notice
|
||||
|
||||
SSH private keys (.ppk, .pem, id_rsa, etc.) should **NEVER** be:
|
||||
- Stored in the application directory
|
||||
- Committed to git repositories
|
||||
- Placed in web-accessible locations
|
||||
|
||||
## Recommended Setup
|
||||
|
||||
### 1. Create Secure Keys Directory on Server
|
||||
|
||||
```bash
|
||||
# On your production server
|
||||
sudo mkdir -p /var/crew-keys
|
||||
sudo chmod 700 /var/crew-keys
|
||||
```
|
||||
|
||||
### 2. Place Your SSH Key
|
||||
|
||||
```bash
|
||||
# Copy your key to the secure location
|
||||
sudo cp /path/to/your/root.ppk /var/crew-keys/
|
||||
sudo chmod 600 /var/crew-keys/root.ppk
|
||||
sudo chown root:root /var/crew-keys/root.ppk
|
||||
```
|
||||
|
||||
### 3. Verify Permissions
|
||||
|
||||
```bash
|
||||
ls -la /var/crew-keys/
|
||||
# Should show: drwx------ (700) for directory
|
||||
# Should show: -rw------- (600) for key file
|
||||
```
|
||||
|
||||
## Docker Configuration
|
||||
|
||||
The `docker-compose.prod.yml` and `docker-compose.dev.yml` files are configured to mount `/var/crew-keys` as a **read-only** volume:
|
||||
|
||||
```yaml
|
||||
volumes:
|
||||
- /var/crew-keys:/var/keys:ro
|
||||
```
|
||||
|
||||
The `:ro` flag ensures the container can only read the keys, not modify them.
|
||||
|
||||
## Application Configuration
|
||||
|
||||
The [config/filesystems.php](config/filesystems.php) references the key at:
|
||||
|
||||
```php
|
||||
'privateKey' => '/var/keys/root.ppk',
|
||||
```
|
||||
|
||||
This path is inside the container and maps to `/var/crew-keys/root.ppk` on the host.
|
||||
|
||||
## Testing
|
||||
|
||||
To verify the SFTP connection works:
|
||||
|
||||
```bash
|
||||
docker exec crewsportswear_app_prod php -r "
|
||||
use League\Flysystem\Sftp\SftpAdapter;
|
||||
try {
|
||||
\$adapter = new SftpAdapter([
|
||||
'host' => '35.232.234.8',
|
||||
'port' => 22,
|
||||
'username' => 'root',
|
||||
'privateKey' => '/var/keys/root.ppk',
|
||||
'root' => '/var/www/html/images',
|
||||
'timeout' => 10,
|
||||
]);
|
||||
echo 'SFTP connection: SUCCESS';
|
||||
} catch (Exception \$e) {
|
||||
echo 'SFTP connection failed: ' . \$e->getMessage();
|
||||
}
|
||||
"
|
||||
```
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
### Permission Denied
|
||||
|
||||
If you get permission errors:
|
||||
|
||||
```bash
|
||||
# Fix directory permissions
|
||||
sudo chmod 700 /var/crew-keys
|
||||
|
||||
# Fix key file permissions
|
||||
sudo chmod 600 /var/crew-keys/root.ppk
|
||||
```
|
||||
|
||||
### Key Format Issues
|
||||
|
||||
PuTTY keys (.ppk) may need conversion for Linux/PHP:
|
||||
|
||||
```bash
|
||||
# Convert .ppk to OpenSSH format
|
||||
puttygen root.ppk -O private-openssh -o /var/crew-keys/root.pem
|
||||
chmod 600 /var/crew-keys/root.pem
|
||||
```
|
||||
|
||||
Then update `filesystems.php`:
|
||||
```php
|
||||
'privateKey' => '/var/keys/root.pem',
|
||||
```
|
||||
|
||||
## Security Best Practices
|
||||
|
||||
✅ **DO:**
|
||||
- Store keys outside application directory
|
||||
- Use restrictive permissions (600 for files, 700 for directories)
|
||||
- Mount as read-only in Docker
|
||||
- Keep keys out of version control
|
||||
- Use SSH key authentication instead of passwords
|
||||
- Rotate keys regularly
|
||||
|
||||
❌ **DON'T:**
|
||||
- Commit keys to git
|
||||
- Store in web-accessible directories
|
||||
- Use world-readable permissions
|
||||
- Share keys across multiple services
|
||||
- Use password-protected keys without proper passphrase management
|
||||
126
UPGRADE_NOTES.md
126
UPGRADE_NOTES.md
@@ -1,126 +0,0 @@
|
||||
# Laravel 5.0 → 11 Upgrade Progress
|
||||
|
||||
## Current State (Baseline)
|
||||
- **Laravel Version**: 5.0.*
|
||||
- **PHP Version**: 5.6.40 (container), 7.0 (production Dockerfile)
|
||||
- **Database**: MySQL via PDO
|
||||
- **Branch**: feature/laravel-upgrade
|
||||
|
||||
## Dependencies Audit
|
||||
|
||||
### Core Dependencies
|
||||
- ✅ `laravel/framework`: 5.0.* → Need to upgrade incrementally
|
||||
- ✅ `webpatser/laravel-uuid`: ^2.0 → Compatible through Laravel 8
|
||||
- ⚠️ `netshell/paypal`: dev-master → May need replacement (outdated)
|
||||
- ⚠️ `guzzlehttp/guzzle`: ~5.0 → Need to upgrade to ^7.0
|
||||
- ✅ `google/recaptcha`: ~1.1 → Still maintained
|
||||
- ⚠️ `spatie/laravel-analytics`: ^1.4 → Need to upgrade to ^5.0
|
||||
- ✅ `league/flysystem-sftp`: ^1.0 → Upgrade to ^3.0 for Laravel 9+
|
||||
- ✅ `aws/aws-sdk-php`: ~3.0 → Compatible
|
||||
|
||||
### Custom Middleware Found
|
||||
- `CheckTeamStorePassword` - Custom team store authentication
|
||||
- `IsAdmin` - Admin role check
|
||||
- `IsUser` - Normal user role check
|
||||
- `isAuthorized` - Custom authorization
|
||||
- `Cors` - CORS handling
|
||||
|
||||
### Custom Code Patterns Detected
|
||||
- ✅ `app/helpers.php` - Auto-loaded helper functions (minio_url, minio_image_url)
|
||||
- ✅ Routes in `app/Http/routes.php` (Laravel 5.0 pattern)
|
||||
- ⚠️ Controllers echoing HTML directly (needs refactoring)
|
||||
- ⚠️ Boolean stored as strings ("TRUE"/"FALSE" in database)
|
||||
|
||||
## Upgrade Path
|
||||
|
||||
### Phase 1: Laravel 5.0 → 5.1 (Week 1)
|
||||
- [ ] Update composer.json
|
||||
- [ ] Test route compatibility
|
||||
- [ ] Verify middleware still works
|
||||
- [ ] Test authentication flow
|
||||
|
||||
### Phase 2: Laravel 5.1 → 5.5 LTS (Week 2)
|
||||
- [ ] Move routes to `routes/web.php`
|
||||
- [ ] Update exception handler
|
||||
- [ ] Test all database queries
|
||||
- [ ] Update validation rules
|
||||
|
||||
### Phase 3: PHP 7.0 → 7.4 & Laravel 5.5 → 6.x (Week 3)
|
||||
- [ ] Update Dockerfile to PHP 7.4
|
||||
- [ ] Remove mcrypt dependencies (if any encrypted data)
|
||||
- [ ] Add string/array helpers package
|
||||
- [ ] Test file uploads
|
||||
|
||||
### Phase 4: Laravel 6.x → 8.x (Week 4)
|
||||
- [ ] Update factory syntax
|
||||
- [ ] Test rate limiting
|
||||
- [ ] Verify queue jobs
|
||||
|
||||
### Phase 5: PHP 8.0 & Laravel 8.x → 9.x (Week 5)
|
||||
- [ ] Update Dockerfile to PHP 8.0
|
||||
- [ ] Update Flysystem to v3 (affects MinIO config)
|
||||
- [ ] Test query builder changes
|
||||
|
||||
### Phase 6: Laravel 9.x → 10.x (Week 6)
|
||||
- [ ] Update to PHP 8.1
|
||||
- [ ] Add type declarations where needed
|
||||
- [ ] Test invokable validation rules
|
||||
|
||||
### Phase 7: Laravel 10.x → 11.x (Week 7)
|
||||
- [ ] Update to PHP 8.2
|
||||
- [ ] Test new application skeleton
|
||||
- [ ] Verify all functionality
|
||||
|
||||
## Breaking Changes to Watch
|
||||
|
||||
### Database
|
||||
- Boolean fields stored as strings ("TRUE"/"FALSE") - Need migration
|
||||
- Direct DB facade usage throughout codebase
|
||||
|
||||
### Routes
|
||||
- Controller array syntax in routes will be removed
|
||||
- Need to update to standard controller@method or invokable
|
||||
|
||||
### Middleware
|
||||
- Middleware signature changes in later versions
|
||||
- CSRF token handling updates
|
||||
|
||||
### Views
|
||||
- Blade syntax mostly compatible
|
||||
- PHP in controllers (<?php echo) needs refactoring
|
||||
|
||||
### External Services
|
||||
- PayPal integration (netshell/paypal) may need complete rewrite
|
||||
- Google Analytics package needs major upgrade
|
||||
- Screenshot Node.js service should remain compatible
|
||||
|
||||
## Rollback Plan
|
||||
- Keep master branch untouched
|
||||
- Tag current state: `git tag v5.0-baseline`
|
||||
- Can revert entire branch if needed
|
||||
- Parallel testing environment on port 8090
|
||||
|
||||
## Testing Checklist (After Each Upgrade)
|
||||
- [ ] Homepage loads
|
||||
- [ ] User registration/login works
|
||||
- [ ] Sports category pages render
|
||||
- [ ] Designer tool loads
|
||||
- [ ] Pattern/clipart selection works
|
||||
- [ ] Cart functionality
|
||||
- [ ] Team store pages
|
||||
- [ ] PayPal checkout flow
|
||||
- [ ] Admin panel access
|
||||
- [ ] Image serving from MinIO
|
||||
- [ ] Screenshot generation service
|
||||
- [ ] File uploads work
|
||||
|
||||
## Notes
|
||||
- Current Composer version 1.x - may need to use `composer self-update --1` during transition
|
||||
- AWS SDK already at 3.0, compatible with all Laravel versions
|
||||
- Helper functions (minio_url) should remain compatible
|
||||
- Fabric.js designer tool is front-end only, won't be affected
|
||||
|
||||
## Completed Steps
|
||||
1. ✅ Created feature branch
|
||||
2. ✅ Documented current state
|
||||
3. ⏳ Ready to start first upgrade
|
||||
@@ -22,8 +22,11 @@ class Handler extends ExceptionHandler {
|
||||
* @param \Exception $e
|
||||
* @return void
|
||||
*/
|
||||
public function report(Exception $e)
|
||||
public function report($e)
|
||||
{
|
||||
if (!$e instanceof Exception) {
|
||||
$e = new \ErrorException($e->getMessage(), $e->getCode(), E_ERROR, $e->getFile(), $e->getLine());
|
||||
}
|
||||
return parent::report($e);
|
||||
}
|
||||
|
||||
@@ -31,11 +34,14 @@ class Handler extends ExceptionHandler {
|
||||
* Render an exception into an HTTP response.
|
||||
*
|
||||
* @param \Illuminate\Http\Request $request
|
||||
* @param \Exception $e
|
||||
* @param mixed $e
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
public function render($request, Exception $e)
|
||||
public function render($request, $e)
|
||||
{
|
||||
if (!$e instanceof Exception) {
|
||||
$e = new \ErrorException($e->getMessage(), $e->getCode(), E_ERROR, $e->getFile(), $e->getLine());
|
||||
}
|
||||
return parent::render($request, $e);
|
||||
}
|
||||
|
||||
|
||||
@@ -5,6 +5,7 @@ use App\Http\Controllers\Controller;
|
||||
|
||||
use Illuminate\Support\Facades\Request1;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Facades\Storage;
|
||||
use App\Models\PrintPatternModel;
|
||||
use App\Models\SizesModel;
|
||||
|
||||
@@ -46,7 +47,7 @@ class PrintPatternController extends Controller {
|
||||
$NewImageName = $templateSize.'.'.$imageExt;
|
||||
|
||||
|
||||
$thumbnail = "uniform-templates/".$templatecode."/".$templateType."/SIZES/" . $NewImageName;
|
||||
$thumbnail = "uploads/images/uniform-templates/".$templatecode."/".$templateType."/SIZES/" . $NewImageName;
|
||||
|
||||
$data = array(
|
||||
'TemplateCode' => $templatecode,
|
||||
@@ -58,9 +59,7 @@ class PrintPatternController extends Controller {
|
||||
$i = $m->insertPrintPattern($data);
|
||||
//var_dump($data);
|
||||
if($i){
|
||||
$r = $request->file('preview_print_template')->move(
|
||||
base_path() . "/public/images/uniform-templates/".$templatecode."/".$templateType."/SIZES/", $NewImageName
|
||||
);
|
||||
Storage::disk('minio')->put('uploads/images/uniform-templates/'.$templatecode.'/'.$templateType.'/SIZES/'.$NewImageName, file_get_contents($request->file('preview_print_template')->getRealPath()));
|
||||
echo '<div class="alert alert-success alert-dismissible">
|
||||
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
||||
<h4><i class="icon fa fa-check"></i> Success!</h4>
|
||||
|
||||
@@ -4,6 +4,7 @@ use App\Http\Requests;
|
||||
use App\Http\Controllers\Controller;
|
||||
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Facades\Storage;
|
||||
use App\Models\TemplatesModel;
|
||||
use App\Models\SportsModel;
|
||||
use App\Models\PrintPatternModel;
|
||||
@@ -48,7 +49,7 @@ class TemplatesController extends Controller {
|
||||
<h3><?php echo $row->TemplateName ?></h3>
|
||||
</div>
|
||||
<div class="sports-border">
|
||||
<a href=""><img src="<?php echo url('public') . "/" . $row->Thumbnail ?>" alt="Sports" height="400px;" class="img img-responsive product-center" /></a>
|
||||
<a href=""><img src="<?php echo minio_url($row->Thumbnail) ?>" alt="Sports" height="400px;" class="img img-responsive product-center" /></a>
|
||||
<div class="sport-edit-btn">
|
||||
<a href="<?php echo url('admin/templates') . "/edit/" . $row->TemplateCode . "/" ?>" class="btn btn-primary btn-block"><i class="fa fa-edit"></i> Edit</a>
|
||||
</div>
|
||||
@@ -129,15 +130,13 @@ class TemplatesController extends Controller {
|
||||
|
||||
|
||||
if($i){
|
||||
$request->file('tempateImage')->move(
|
||||
base_path() . '/public/images/templates/thumbnail', $NewImageName
|
||||
);
|
||||
Storage::disk('minio')->put('images/templates/thumbnail/' . $NewImageName, file_get_contents($request->file('tempateImage')->getRealPath()));
|
||||
|
||||
//for front jersey
|
||||
if(!empty($request->file('svgJerseyFront')->getClientOriginalName())){
|
||||
|
||||
$svgName = $request->file('svgJerseyFront')->getClientOriginalName();
|
||||
$svgThumbnail = "uniform-templates/".$templateCode."/DISPLAY/".$svgName;
|
||||
$svgThumbnail = "uploads/images/uniform-templates/".$templateCode."/DISPLAY/".$svgName;
|
||||
//var_dump($svgThumbnail);
|
||||
$Templatedata = array(
|
||||
'TemplateCode' => $templateCode,
|
||||
@@ -149,16 +148,14 @@ class TemplatesController extends Controller {
|
||||
|
||||
$i = $m->insertTempaltePaths($Templatedata);
|
||||
if($i){
|
||||
$request->file('svgJerseyFront')->move(
|
||||
base_path() . '/public/images/uniform-templates/'.$templateCode. '/DISPLAY' , $svgName
|
||||
);
|
||||
Storage::disk('minio')->put('uploads/images/uniform-templates/'.$templateCode.'/DISPLAY/'.$svgName, file_get_contents($request->file('svgJerseyFront')->getRealPath()));
|
||||
}
|
||||
}
|
||||
|
||||
if(!empty($request->file('svgJerseyBack')->getClientOriginalName())){
|
||||
|
||||
$svgName = $request->file('svgJerseyBack')->getClientOriginalName();
|
||||
$svgThumbnail = "uniform-templates/".$templateCode."/DISPLAY/".$svgName;
|
||||
$svgThumbnail = "uploads/images/uniform-templates/".$templateCode."/DISPLAY/".$svgName;
|
||||
|
||||
$Templatedata = array(
|
||||
'TemplateCode' => $templateCode,
|
||||
@@ -170,16 +167,14 @@ class TemplatesController extends Controller {
|
||||
|
||||
$i = $m->insertTempaltePaths($Templatedata);
|
||||
if($i){
|
||||
$request->file('svgJerseyBack')->move(
|
||||
base_path() . '/public/images/uniform-templates/'.$templateCode. '/DISPLAY' , $svgName
|
||||
);
|
||||
Storage::disk('minio')->put('uploads/images/uniform-templates/'.$templateCode.'/DISPLAY/'.$svgName, file_get_contents($request->file('svgJerseyBack')->getRealPath()));
|
||||
}
|
||||
}
|
||||
|
||||
if(!empty($request->file('svgShortRight')->getClientOriginalName())){
|
||||
|
||||
$svgName = $request->file('svgShortRight')->getClientOriginalName();
|
||||
$svgThumbnail = "uniform-templates/".$templateCode."/DISPLAY/".$svgName;
|
||||
$svgThumbnail = "uploads/images/uniform-templates/".$templateCode."/DISPLAY/".$svgName;
|
||||
|
||||
$Templatedata = array(
|
||||
'TemplateCode' => $templateCode,
|
||||
@@ -191,16 +186,14 @@ class TemplatesController extends Controller {
|
||||
|
||||
$i = $m->insertTempaltePaths($Templatedata);
|
||||
if($i){
|
||||
$request->file('svgShortRight')->move(
|
||||
base_path() . '/public/images/uniform-templates/'.$templateCode. '/DISPLAY' , $svgName
|
||||
);
|
||||
Storage::disk('minio')->put('uploads/images/uniform-templates/'.$templateCode.'/DISPLAY/'.$svgName, file_get_contents($request->file('svgShortRight')->getRealPath()));
|
||||
}
|
||||
}
|
||||
|
||||
if(!empty($request->file('svgShortLeft')->getClientOriginalName())){
|
||||
|
||||
$svgName = $request->file('svgShortLeft')->getClientOriginalName();
|
||||
$svgThumbnail = "uniform-templates/".$templateCode."/DISPLAY/".$svgName;
|
||||
$svgThumbnail = "uploads/images/uniform-templates/".$templateCode."/DISPLAY/".$svgName;
|
||||
|
||||
$Templatedata = array(
|
||||
'TemplateCode' => $templateCode,
|
||||
@@ -212,9 +205,7 @@ class TemplatesController extends Controller {
|
||||
|
||||
$i = $m->insertTempaltePaths($Templatedata);
|
||||
if($i){
|
||||
$request->file('svgShortLeft')->move(
|
||||
base_path() . '/public/images/uniform-templates/'.$templateCode. '/DISPLAY' , $svgName
|
||||
);
|
||||
Storage::disk('minio')->put('uploads/images/uniform-templates/'.$templateCode.'/DISPLAY/'.$svgName, file_get_contents($request->file('svgShortLeft')->getRealPath()));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -270,9 +261,7 @@ class TemplatesController extends Controller {
|
||||
'PatternId' => $getSkins
|
||||
);
|
||||
|
||||
$request->file('tempateImage')->move(
|
||||
base_path() . '/public/images/templates/thumbnail', $NewImageName
|
||||
);
|
||||
Storage::disk('minio')->put('images/templates/thumbnail/' . $NewImageName, file_get_contents($request->file('tempateImage')->getRealPath()));
|
||||
|
||||
}else{
|
||||
|
||||
@@ -298,7 +287,7 @@ class TemplatesController extends Controller {
|
||||
//echo 'meron jerset front';
|
||||
|
||||
$svgName = $request->file('svgJerseyFront')->getClientOriginalName();
|
||||
$svgThumbnail = "uniform-templates/".$templateCode."/DISPLAY/".$svgName;
|
||||
$svgThumbnail = "uploads/images/uniform-templates/".$templateCode."/DISPLAY/".$svgName;
|
||||
|
||||
$Templatedata = array(
|
||||
'Type' => 'Jersey',
|
||||
@@ -308,9 +297,7 @@ class TemplatesController extends Controller {
|
||||
|
||||
$i = $m->updateTemplatePaths($Templatedata, $post['id_svgJerseyFront']);
|
||||
if($i){
|
||||
$request->file('svgJerseyFront')->move(
|
||||
base_path() . '/public/images/uniform-templates/'.$templateCode. '/DISPLAY' , $svgName
|
||||
);
|
||||
Storage::disk('minio')->put('uploads/images/uniform-templates/'.$templateCode.'/DISPLAY/'.$svgName, file_get_contents($request->file('svgJerseyFront')->getRealPath()));
|
||||
//echo 'image move success';
|
||||
}
|
||||
}
|
||||
@@ -318,7 +305,7 @@ class TemplatesController extends Controller {
|
||||
if (array_key_exists('svgJerseyBack', $post)) {
|
||||
|
||||
$svgName = $request->file('svgJerseyBack')->getClientOriginalName();
|
||||
$svgThumbnail = "uniform-templates/".$templateCode."/DISPLAY/".$svgName;
|
||||
$svgThumbnail = "uploads/images/uniform-templates/".$templateCode."/DISPLAY/".$svgName;
|
||||
|
||||
$Templatedata = array(
|
||||
'Type' => 'Jersey',
|
||||
@@ -327,16 +314,13 @@ class TemplatesController extends Controller {
|
||||
);
|
||||
$i = $m->updateTemplatePaths($Templatedata, $post['id_svgJerseyBack']);
|
||||
if($i){
|
||||
|
||||
$request->file('svgJerseyBack')->move(
|
||||
base_path() . '/public/images/uniform-templates/'.$templateCode. '/DISPLAY' , $svgName
|
||||
);
|
||||
Storage::disk('minio')->put('uploads/images/uniform-templates/'.$templateCode.'/DISPLAY/'.$svgName, file_get_contents($request->file('svgJerseyBack')->getRealPath()));
|
||||
}
|
||||
}
|
||||
|
||||
if (array_key_exists('svgShortRight', $post)) {
|
||||
$svgName = $request->file('svgShortRight')->getClientOriginalName();
|
||||
$svgThumbnail = "uniform-templates/".$templateCode."/DISPLAY/".$svgName;
|
||||
$svgThumbnail = "uploads/images/uniform-templates/".$templateCode."/DISPLAY/".$svgName;
|
||||
|
||||
$Templatedata = array(
|
||||
'Type' => 'Shorts',
|
||||
@@ -346,15 +330,13 @@ class TemplatesController extends Controller {
|
||||
|
||||
$i = $m->updateTemplatePaths($Templatedata, $post['id_svgShortRight']);
|
||||
if($i){
|
||||
$request->file('svgShortRight')->move(
|
||||
base_path() . '/public/images/uniform-templates/'.$templateCode. '/DISPLAY' , $svgName
|
||||
);
|
||||
Storage::disk('minio')->put('uploads/images/uniform-templates/'.$templateCode.'/DISPLAY/'.$svgName, file_get_contents($request->file('svgShortRight')->getRealPath()));
|
||||
}
|
||||
}
|
||||
|
||||
if (array_key_exists('svgShortLeft', $post)) {
|
||||
$svgName = $request->file('svgShortLeft')->getClientOriginalName();
|
||||
$svgThumbnail = "uniform-templates/".$templateCode."/DISPLAY/".$svgName;
|
||||
$svgThumbnail = "uploads/images/uniform-templates/".$templateCode."/DISPLAY/".$svgName;
|
||||
|
||||
$Templatedata = array(
|
||||
'Type' => 'Shorts',
|
||||
@@ -364,9 +346,7 @@ class TemplatesController extends Controller {
|
||||
|
||||
$i = $m->updateTemplatePaths($Templatedata, $post['id_svgShortLeft']);
|
||||
if($i){
|
||||
$request->file('svgShortLeft')->move(
|
||||
base_path() . '/public/images/uniform-templates/'.$templateCode. '/DISPLAY' , $svgName
|
||||
);
|
||||
Storage::disk('minio')->put('uploads/images/uniform-templates/'.$templateCode.'/DISPLAY/'.$svgName, file_get_contents($request->file('svgShortLeft')->getRealPath()));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
46
app/Http/Controllers/TestEmailController.php
Normal file
46
app/Http/Controllers/TestEmailController.php
Normal file
@@ -0,0 +1,46 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Facades\Mail;
|
||||
|
||||
class TestEmailController extends Controller
|
||||
{
|
||||
|
||||
public function show()
|
||||
{
|
||||
return view('test-email', ['token' => csrf_token()]);
|
||||
}
|
||||
|
||||
public function send(Request $request)
|
||||
{
|
||||
$this->validate($request, [
|
||||
'recipient' => 'required|email',
|
||||
]);
|
||||
|
||||
$recipient = $request->input('recipient');
|
||||
$config = [
|
||||
'driver' => config('mail.driver'),
|
||||
'host' => config('mail.host'),
|
||||
'port' => config('mail.port'),
|
||||
'username' => config('mail.username'),
|
||||
'encryption' => config('mail.encryption'),
|
||||
];
|
||||
|
||||
try {
|
||||
Mail::send('emails.test', ['config' => $config, 'recipient' => $recipient], function ($message) use ($recipient) {
|
||||
$message->from('no-reply@crewsportswear.com', 'CREW Sportswear');
|
||||
$message->to($recipient)->subject('CREW Sportswear — Test Email');
|
||||
});
|
||||
|
||||
$status = 'success';
|
||||
$message = 'Test email sent successfully to ' . $recipient . '.';
|
||||
} catch (\Throwable $e) {
|
||||
$status = 'danger';
|
||||
$message = 'Failed to send email: ' . $e->getMessage();
|
||||
}
|
||||
|
||||
return redirect()->back()->with('status', $status)->with('message', $message);
|
||||
}
|
||||
}
|
||||
@@ -41,6 +41,10 @@ Route::get('cart', ['as' => 'cart', 'uses' => 'teamstore\TeamStoreController@car
|
||||
Route::get('/checkout', 'teamstore\TeamStoreController@checkout');
|
||||
Route::get('/mail', 'teamstore\TeamStoreController@mail');
|
||||
|
||||
// Test email page
|
||||
Route::get('/test-email', 'TestEmailController@show');
|
||||
Route::post('/test-email/send', 'TestEmailController@send');
|
||||
|
||||
Route::get('/designer/{templateid}', 'designer\DesignerController@index');
|
||||
|
||||
Route::get('/designer/preview/{designCode}', 'designer\DesignerController@getDesign');
|
||||
|
||||
@@ -77,7 +77,7 @@ return [
|
||||
'port' => 22,
|
||||
'username' => 'root',
|
||||
'password' => '',
|
||||
'privateKey' => '/var/www/html/_key/instance2/root.ppk',
|
||||
'privateKey' => '/var/keys/root.ppk',
|
||||
'root' => '/var/www/html/images',
|
||||
'timeout' => 10
|
||||
],
|
||||
|
||||
@@ -18,6 +18,7 @@ return [
|
||||
|
||||
'prod_private_server_ip' => env('https://crewsportswear.app', 'https://crewsportswear.app'),
|
||||
'images_url' => env('https://crewsportswear.app:5955', 'https://crewsportswear.app:5955'),
|
||||
'minio_url' => env('MINIO_URL', 'https://minio.crewsportswear.app/crewsportswear'),
|
||||
'uploads' => env('https://crewsportswear.com/uploads/images/', 'https://crewsportswear.com/uploads/images/'), // local
|
||||
|
||||
|
||||
|
||||
@@ -31,6 +31,7 @@ services:
|
||||
volumes:
|
||||
- ./storage:/var/www/html/storage
|
||||
- ./public/uploads:/var/www/html/public/uploads
|
||||
- /var/crew-keys:/var/keys:ro
|
||||
labels:
|
||||
- "traefik.enable=true"
|
||||
# Development environment (dev.crewsportswear.app)
|
||||
|
||||
@@ -31,6 +31,7 @@ services:
|
||||
volumes:
|
||||
- ./storage:/var/www/html/storage
|
||||
- ./public/uploads:/var/www/html/public/uploads
|
||||
- /var/crew-keys:/var/keys:ro
|
||||
labels:
|
||||
- "traefik.enable=true"
|
||||
# Production environment (crewsportswear.com) - Uses paid SSL certificate
|
||||
|
||||
90
public/designer/js/centering_guidelines.js
Normal file
90
public/designer/js/centering_guidelines.js
Normal file
@@ -0,0 +1,90 @@
|
||||
/**
|
||||
* Augments canvas by assigning to `onObjectMove` and `onAfterRender`.
|
||||
* This kind of sucks because other code using those methods will stop functioning.
|
||||
* Need to fix it by replacing callbacks with pub/sub kind of subscription model.
|
||||
* (or maybe use existing fabric.util.fire/observe (if it won't be too slow))
|
||||
*/
|
||||
function initCenteringGuidelines(canvas) {
|
||||
|
||||
var canvasWidth = canvas.getWidth(),
|
||||
canvasHeight = canvas.getHeight(),
|
||||
canvasWidthCenter = canvasWidth / 2,
|
||||
canvasHeightCenter = canvasHeight / 2,
|
||||
canvasWidthCenterMap = { },
|
||||
canvasHeightCenterMap = { },
|
||||
centerLineMargin = 4,
|
||||
centerLineColor = 'rgba(255,0,241,0.5)',
|
||||
centerLineWidth = 1,
|
||||
ctx = canvas.getSelectionContext(),
|
||||
viewportTransform;
|
||||
|
||||
for (var i = canvasWidthCenter - centerLineMargin, len = canvasWidthCenter + centerLineMargin; i <= len; i++) {
|
||||
canvasWidthCenterMap[Math.round(i)] = true;
|
||||
}
|
||||
for (var i = canvasHeightCenter - centerLineMargin, len = canvasHeightCenter + centerLineMargin; i <= len; i++) {
|
||||
canvasHeightCenterMap[Math.round(i)] = true;
|
||||
}
|
||||
|
||||
function showVerticalCenterLine() {
|
||||
showCenterLine(canvasWidthCenter + 0.5, 0, canvasWidthCenter + 0.5, canvasHeight);
|
||||
}
|
||||
|
||||
function showHorizontalCenterLine() {
|
||||
showCenterLine(0, canvasHeightCenter + 0.5, canvasWidth, canvasHeightCenter + 0.5);
|
||||
}
|
||||
|
||||
function showCenterLine(x1, y1, x2, y2) {
|
||||
ctx.save();
|
||||
ctx.strokeStyle = centerLineColor;
|
||||
ctx.lineWidth = centerLineWidth;
|
||||
ctx.beginPath();
|
||||
ctx.moveTo(x1 * viewportTransform[0], y1 * viewportTransform[3]);
|
||||
ctx.lineTo(x2 * viewportTransform[0], y2 * viewportTransform[3]);
|
||||
ctx.stroke();
|
||||
ctx.restore();
|
||||
}
|
||||
|
||||
var afterRenderActions = [],
|
||||
isInVerticalCenter,
|
||||
isInHorizontalCenter;
|
||||
|
||||
canvas.on('mouse:down', function () {
|
||||
viewportTransform = canvas.viewportTransform;
|
||||
});
|
||||
|
||||
canvas.on('object:moving', function(e) {
|
||||
var object = e.target,
|
||||
objectCenter = object.getCenterPoint(),
|
||||
transform = canvas._currentTransform;
|
||||
|
||||
if (!transform) return;
|
||||
|
||||
isInVerticalCenter = Math.round(objectCenter.x) in canvasWidthCenterMap,
|
||||
isInHorizontalCenter = Math.round(objectCenter.y) in canvasHeightCenterMap;
|
||||
|
||||
if (isInHorizontalCenter || isInVerticalCenter) {
|
||||
object.setPositionByOrigin(new fabric.Point((isInVerticalCenter ? canvasWidthCenter : objectCenter.x), (isInHorizontalCenter ? canvasHeightCenter : objectCenter.y)), 'center', 'center');
|
||||
}
|
||||
});
|
||||
|
||||
canvas.on('before:render', function() {
|
||||
if (canvas.contextTop) {
|
||||
canvas.clearContext(canvas.contextTop);
|
||||
}
|
||||
});
|
||||
|
||||
canvas.on('after:render', function() {
|
||||
if (isInVerticalCenter) {
|
||||
showVerticalCenterLine();
|
||||
}
|
||||
if (isInHorizontalCenter) {
|
||||
showHorizontalCenterLine();
|
||||
}
|
||||
});
|
||||
|
||||
canvas.on('mouse:up', function() {
|
||||
// clear these values, to stop drawing guidelines once mouse is up
|
||||
isInVerticalCenter = isInHorizontalCenter = null;
|
||||
canvas.renderAll();
|
||||
});
|
||||
}
|
||||
@@ -886,8 +886,8 @@
|
||||
<script src="{{asset('/designer/js/custom-script.js')}}"></script>
|
||||
<script src="https://gitcdn.github.io/bootstrap-toggle/2.2.2/js/bootstrap-toggle.min.js"></script>
|
||||
<script src="https://ajax.aspnetcdn.com/ajax/jquery.validate/1.11.1/jquery.validate.min.js"></script>
|
||||
<script src="https://rawgit.com/fabricjs/fabric.js/master/lib/centering_guidelines.js"></script>
|
||||
<script src="https://rawgit.com/fabricjs/fabric.js/master/lib/aligning_guidelines.js"></script>
|
||||
<script src="{{asset('/designer/js/centering_guidelines.js')}}"></script>
|
||||
<script src="{{asset('/designer/js/aligning_guidelines.js')}}"></script>
|
||||
<script>
|
||||
|
||||
$(document).ready(function() {
|
||||
|
||||
@@ -407,7 +407,7 @@
|
||||
<td align="left" style="width: 180px;">
|
||||
@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 }}">
|
||||
<img style="height: 200px; overflow: hidden; object-fit: contain;" src="{{ minio_url('images/' . $img->Image) }}">
|
||||
@endif
|
||||
@endforeach
|
||||
</td>
|
||||
|
||||
23
resources/views/emails/test.blade.php
Normal file
23
resources/views/emails/test.blade.php
Normal file
@@ -0,0 +1,23 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Test Email — CREW Sportswear</title>
|
||||
</head>
|
||||
<body style="font-family: Arial, sans-serif; color: #333; padding: 20px;">
|
||||
<h2 style="color: #d9534f;">CREW Sportswear — Test Email</h2>
|
||||
<p>This is a test email to verify that the mail configuration is working correctly.</p>
|
||||
<p>Sent to: <strong>{{ $recipient }}</strong></p>
|
||||
<hr>
|
||||
<p style="font-size: 12px; color: #777;">
|
||||
<strong>Mail Config Used:</strong><br>
|
||||
Driver: {{ $config['driver'] }}<br>
|
||||
Host: {{ $config['host'] }}<br>
|
||||
Port: {{ $config['port'] }}<br>
|
||||
Username: {{ $config['username'] }}<br>
|
||||
Encryption: {{ $config['encryption'] }}
|
||||
</p>
|
||||
<hr>
|
||||
<p style="font-size: 12px; color: #aaa;">This is an automated test message from CREW Sportswear.</p>
|
||||
</body>
|
||||
</html>
|
||||
@@ -138,7 +138,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="{{ minio_url('images/' . $img->Image) }}">
|
||||
@endif
|
||||
@endforeach
|
||||
</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="{{ minio_url('images/' . $item->Image) }}"></td>
|
||||
<td colspan="5">
|
||||
<h4>{{ $item->ProductName }} {{ $itemOrder }} <br>Price: ${{ $item->Price }}</h4>
|
||||
</td>
|
||||
|
||||
@@ -205,7 +205,7 @@
|
||||
<div class="col-md-3 col-sm-6">
|
||||
<span class="thumbnail">
|
||||
<a href="{{ url('teamstore') }}/{{ $store_array[0]->StoreUrl }}/product/{{ $product->ProductURL }}">
|
||||
<img style="height: 201.84px;" src="{{ config('site_config.images_url') }}/{{ $filename }}" alt="{{ $product->ProductName }}" >
|
||||
<img style="height: 201.84px;" src="{{ minio_url('images/' . $filename) }}" alt="{{ $product->ProductName }}" >
|
||||
</a>
|
||||
<h4 class="text-center product-name-holder">{{ $product->ProductName }}</h4>
|
||||
<hr class="line">
|
||||
|
||||
@@ -234,13 +234,13 @@
|
||||
@if($thumbnail->ImageClass == 'active')
|
||||
<div class="active item text-center" data-slide-number="{{ $i }}">
|
||||
<span class="zoom img-zoom">
|
||||
<img style="height:400px;" src="{{ config('site_config.images_url') }}/{{ $thumbnail->Image }}">
|
||||
<img style="height:400px;" src="{{ minio_url('images/' . $thumbnail->Image) }}">
|
||||
</span>
|
||||
</div>
|
||||
@else
|
||||
<div class="item text-center" data-slide-number="{{ $i }}">
|
||||
<span class="zoom img-zoom">
|
||||
<img style="height:400px;" src="{{ config('site_config.images_url') }}/{{ $thumbnail->Image }}">
|
||||
<img style="height:400px;" src="{{ minio_url('images/' . $thumbnail->Image) }}">
|
||||
</span>
|
||||
</div>
|
||||
@endif
|
||||
@@ -269,7 +269,7 @@
|
||||
@foreach($thumbnails_array as $thumbnail)
|
||||
<li class="col-sm-3 col-xs-3">
|
||||
<a class="thumbnail a_thumbnail {{ $thumbnail->ImageClass }}" id="carousel-selector-{{ $j }}">
|
||||
<img class="img img-responsive product-center image-thumbnails" style="height: 59.45px;" src="{{ config('site_config.images_url') }}/{{ $thumbnail->Image }}"/>
|
||||
<img class="img img-responsive product-center image-thumbnails" style="height: 59.45px;" src="{{ minio_url('images/' . $thumbnail->Image) }}"/>
|
||||
</a>
|
||||
</li>
|
||||
@define $j++
|
||||
|
||||
56
resources/views/test-email.blade.php
Normal file
56
resources/views/test-email.blade.php
Normal file
@@ -0,0 +1,56 @@
|
||||
@extends('layout.main')
|
||||
|
||||
@section('content')
|
||||
<div class="row">
|
||||
<div class="col-md-6 col-md-offset-3" style="margin-top: 40px; margin-bottom: 40px;">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h3 class="panel-title"><strong>Send Test Email</strong></h3>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
|
||||
@if (session('message'))
|
||||
<div class="alert alert-{{ session('status') }} alert-dismissible" role="alert">
|
||||
<button type="button" class="close" data-dismiss="alert" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
{{ session('message') }}
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<!-- Mail Config Info -->
|
||||
<div class="well well-sm" style="font-size: 12px;">
|
||||
<strong>Current Mail Config</strong><br>
|
||||
Driver: <code>{{ config('mail.driver') ?: '(not set)' }}</code><br>
|
||||
Host: <code>{{ config('mail.host') ?: '(not set)' }}</code><br>
|
||||
Port: <code>{{ config('mail.port') ?: '(not set)' }}</code><br>
|
||||
Username: <code>{{ config('mail.username') ?: '(not set)' }}</code><br>
|
||||
Encryption: <code>{{ config('mail.encryption') ?: '(not set)' }}</code>
|
||||
</div>
|
||||
|
||||
<form method="POST" action="{{ url('test-email/send') }}">
|
||||
<input type="hidden" name="_token" value="{{ csrf_token() }}">
|
||||
<input type="hidden" name="token" value="{{ $token }}">
|
||||
<div class="form-group{{ $errors->has('recipient') ? ' has-error' : '' }}">
|
||||
<label for="recipient">Recipient Email</label>
|
||||
<input type="email"
|
||||
name="recipient"
|
||||
id="recipient"
|
||||
class="form-control"
|
||||
placeholder="you@example.com"
|
||||
value="{{ old('recipient') }}"
|
||||
required>
|
||||
@if ($errors->has('recipient'))
|
||||
<span class="help-block">{{ $errors->first('recipient') }}</span>
|
||||
@endif
|
||||
</div>
|
||||
<button type="submit" class="btn btn-primary btn-block">
|
||||
<i class="fa fa-envelope"></i> Send Test Email
|
||||
</button>
|
||||
</form>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
@@ -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="{{ minio_url('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="{{ minio_url('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="{{ minio_url('images/' . $row->DesignCode . '-' . strtolower($row1->Side) . '-thumbnail.png') }}"/>
|
||||
</a>
|
||||
<!-- <p> </p>
|
||||
<div class="text-center">
|
||||
|
||||
@@ -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="{{ minio_url('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') . '/images/' . $array_thumbnail_display[0]->Image }}">
|
||||
<img class="previewImage" id="active_thumbnail" src="{{ minio_url('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="{{ minio_url('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="{{ minio_url('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="{{ minio_url('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="{{ minio_url('images/' . $row->DesignCode . '-' . strtolower($row1->Side) . '-thumbnail.png') }}"/>
|
||||
</a>
|
||||
<!-- <p> </p>
|
||||
<div class="text-center">
|
||||
|
||||
@@ -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="{{ minio_url('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="{{ minio_url('images/' . $filename) . '?t=' . time() }}" alt="{{ $product->ProductName }}" >
|
||||
</a>
|
||||
<hr class="line">
|
||||
<div class="pull-right">
|
||||
|
||||
@@ -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="{{ minio_url('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="{{ minio_url('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="{{ minio_url('images/' . $row->DesignCode . '-' . strtolower($row1->Side) . '-thumbnail.png') }}"/>
|
||||
</a>
|
||||
</li>
|
||||
@endif
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
<div class="col-md-12 text-center">
|
||||
@foreach($thumbnails_array as $thumbnail)
|
||||
@if($thumbnail->ImageClass == 'active')
|
||||
<img style="height:400px" src="{{ config('site_config.images_url') }}/{{ $thumbnail->Image . '?t=' . time() }}" id="main-thumbnail">
|
||||
<img style="height:400px" src="{{ minio_url('images/' . $thumbnail->Image) . '?t=' . time() }}" id="main-thumbnail">
|
||||
@endif
|
||||
@endforeach
|
||||
</div>
|
||||
@@ -58,7 +58,7 @@
|
||||
<li class="col-sm-3 col-xs-4">
|
||||
<a class="thumbnail a_thumbnail {{ $thumbnail->ImageClass }}" style="border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; margin-bottom: -28px;">
|
||||
<!-- <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() }}"/>
|
||||
<img class="img img-responsive product-center image-thumbnails" style="height: 59.45px;" src="{{ minio_url('images/' . $thumbnail->Image) . '?t=' . time() }}"/>
|
||||
</a>
|
||||
<div class="funkyradio">
|
||||
<div class="funkyradio-primary">
|
||||
@@ -200,7 +200,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() }}"/></td>
|
||||
<td><img class="img img-responsive product-center" style="height: 59.45px;" src="{{ minio_url('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> -->
|
||||
<button class="btn btn-default btn-sm btn-delete-item-image" data-id="{{ $thumbnail->Id }}" data-filename="{{ $thumbnail->Image }}" title="Delete Image"><i class="fa fa-trash"></i></button>
|
||||
|
||||
Reference in New Issue
Block a user