Fixed upload parh for asset models

This commit is contained in:
snipe 2019-12-04 15:23:49 -08:00
parent 704c696711
commit c635db0a76
3 changed files with 4 additions and 4 deletions

View file

@ -29,7 +29,7 @@ class AssetModelsTransformer
'id' => (int) $assetmodel->manufacturer->id,
'name'=> e($assetmodel->manufacturer->name)
] : null,
'image' => ($assetmodel->image!='') ? Storage::disk('public')->url('assetmodels/'.e($assetmodel->image)) : null,
'image' => ($assetmodel->image!='') ? Storage::disk('public')->url('models/'.e($assetmodel->image)) : null,
'model_number' => e($assetmodel->model_number),
'depreciation' => ($assetmodel->depreciation) ? [
'id' => (int) $assetmodel->depreciation->id,

View file

@ -48,11 +48,11 @@ class SettingsServiceProvider extends ServiceProvider
});
\App::singleton('models_upload_path', function(){
return 'assetmodels/';
return 'models/';
});
\App::singleton('models_upload_url', function(){
return 'assetmodels/';
return 'models/';
});
// Categories

View file

@ -52,7 +52,7 @@ $config = [
'public' => [
'driver' => 'local',
'root' => storage_path('app/public'),
'url' => env('APP_URL').'/storage',
'url' => env('APP_URL').'/uploads',
'visibility' => 'public',
],