diff --git a/app/Http/Controllers/Accessories/AccessoriesController.php b/app/Http/Controllers/Accessories/AccessoriesController.php index 3f4d866beb..a96859d928 100755 --- a/app/Http/Controllers/Accessories/AccessoriesController.php +++ b/app/Http/Controllers/Accessories/AccessoriesController.php @@ -79,8 +79,8 @@ class AccessoriesController extends Controller $accessory->user_id = Auth::user()->id; $accessory->supplier_id = request('supplier_id'); - $accessory = $request->handleImages($accessory, 500, 'image', 'public/uploads'); - + $accessory = $request->handleImages($accessory); + // Was the accessory created? if ($accessory->save()) { // Redirect to the new accessory page diff --git a/app/Http/Requests/ImageUploadRequest.php b/app/Http/Requests/ImageUploadRequest.php index 50d9b8a8c7..9f1d04b8e7 100644 --- a/app/Http/Requests/ImageUploadRequest.php +++ b/app/Http/Requests/ImageUploadRequest.php @@ -49,7 +49,7 @@ class ImageUploadRequest extends Request $type = strtolower(class_basename(get_class($item))); if (is_null($path)) { - $path = 'public/uploads/'.str_plural($type); + $path = str_plural($type); \Log::info('Path is: '.$path); } diff --git a/app/Http/Transformers/AccessoriesTransformer.php b/app/Http/Transformers/AccessoriesTransformer.php index b06b6bb804..8b56ae05f6 100644 --- a/app/Http/Transformers/AccessoriesTransformer.php +++ b/app/Http/Transformers/AccessoriesTransformer.php @@ -24,7 +24,7 @@ class AccessoriesTransformer $array = [ 'id' => $accessory->id, 'name' => e($accessory->name), - 'image' => ($accessory->image) ? Storage::disk('public')->url('uploads/accessories/'.e($accessory->image)) : null, + 'image' => ($accessory->image) ? Storage::disk('public')->url('accessories/'.e($accessory->image)) : null, 'company' => ($accessory->company) ? ['id' => $accessory->company->id,'name'=> e($accessory->company->name)] : null, 'manufacturer' => ($accessory->manufacturer) ? ['id' => $accessory->manufacturer->id,'name'=> e($accessory->manufacturer->name)] : null, 'supplier' => ($accessory->supplier) ? ['id' => $accessory->supplier->id,'name'=> e($accessory->supplier->name)] : null, diff --git a/app/Providers/SettingsServiceProvider.php b/app/Providers/SettingsServiceProvider.php index 0a9586173d..adf25b6435 100644 --- a/app/Providers/SettingsServiceProvider.php +++ b/app/Providers/SettingsServiceProvider.php @@ -71,7 +71,7 @@ class SettingsServiceProvider extends ServiceProvider }); \App::singleton('locations_upload_url', function(){ - return 'storage/public_uploads/locations/'; + return 'locations/'; }); // Users @@ -80,7 +80,7 @@ class SettingsServiceProvider extends ServiceProvider }); \App::singleton('users_upload_url', function(){ - return 'public_uploads/users/'; + return 'users/'; }); // Manufacturers @@ -89,7 +89,7 @@ class SettingsServiceProvider extends ServiceProvider }); \App::singleton('manufacturers_upload_url', function(){ - return 'public_uploads/manufacturers/'; + return 'manufacturers/'; }); // Suppliers @@ -98,7 +98,7 @@ class SettingsServiceProvider extends ServiceProvider }); \App::singleton('suppliers_upload_url', function(){ - return 'storage/public_uploads/suppliers/'; + return 'suppliers/'; }); // Departments @@ -116,63 +116,35 @@ class SettingsServiceProvider extends ServiceProvider }); \App::singleton('companies_upload_url', function(){ - return 'storage/public_uploads/companies/'; + return 'companies/'; }); // Accessories paths and URLs \App::singleton('accessories_upload_path', function(){ - return public_path('/uploads/accessories/'); + return 'accessories/'; }); \App::singleton('accessories_upload_url', function(){ - return url('/').'/uploads/accessories/'; + return 'accessories/'; }); // Consumables paths and URLs \App::singleton('consumables_upload_path', function(){ - return public_path('/uploads/consumables/'); + return 'consumables/'; }); \App::singleton('consumables_upload_url', function(){ - return url('/').'/uploads/consumables/'; + return 'consumables/'; }); // Components paths and URLs \App::singleton('components_upload_path', function(){ - return public_path('/uploads/components/'); + return 'components/'; }); \App::singleton('components_upload_url', function(){ - return url('/').'/uploads/components/'; - }); - - // Accessories paths and URLs - \App::singleton('accessories_upload_path', function(){ - return public_path('/uploads/accessories/'); - }); - - \App::singleton('accessories_upload_url', function(){ - return url('/').'/uploads/accessories/'; - }); - - // Consumables paths and URLs - \App::singleton('consumables_upload_path', function(){ - return public_path('/uploads/consumables/'); - }); - - \App::singleton('consumables_upload_url', function(){ - return url('/').'/uploads/consumables/'; - }); - - - // Components paths and URLs - \App::singleton('components_upload_path', function(){ - return public_path('/uploads/components/'); - }); - - \App::singleton('components_upload_url', function(){ - return url('/').'/uploads/components/'; + return 'components/'; }); diff --git a/public/mix-manifest.json b/public/mix-manifest.json index 876bb286a6..d053b967a1 100644 --- a/public/mix-manifest.json +++ b/public/mix-manifest.json @@ -19,8 +19,8 @@ "/css/dist/skins/skin-orange-dark.css": "/css/dist/skins/skin-orange-dark.css?id=71c178700d68294e3413", "/css/dist/skins/skin-orange.css": "/css/dist/skins/skin-orange.css?id=b4fc4a74e1f6367dc3e2", "/css/dist/all.css": "/css/dist/all.css?id=cd644954b1fc39b7f25b", - "/css/blue.png": "/css/blue.png?id=e83a6c29e04fe851f212", - "/css/blue@2x.png": "/css/blue@2x.png?id=51135dd4d24f88f5de0b", + "/css/blue.png": "/css/blue.png?id=4c85d6a97173123bd14a", + "/css/blue@2x.png": "/css/blue@2x.png?id=62c67c6a822439e8a4ac", "/css/dist/skins/skin-green-dark.min.css": "/css/dist/skins/skin-green-dark.min.css?id=0cfa39cacd9c83b4f53b", "/css/dist/skins/skin-black-dark.min.css": "/css/dist/skins/skin-black-dark.min.css?id=6bd9c2420a41eaf96f0b", "/css/dist/skins/skin-blue-dark.min.css": "/css/dist/skins/skin-blue-dark.min.css?id=2f665cf40d7348b3f94c", diff --git a/resources/views/accessories/view.blade.php b/resources/views/accessories/view.blade.php index f8ec45c31f..5ca50ea4f4 100644 --- a/resources/views/accessories/view.blade.php +++ b/resources/views/accessories/view.blade.php @@ -92,7 +92,7 @@ @if ($accessory->image!='')
@endif