|
|
@ -67,7 +67,7 @@ class SettingController extends Controller |
|
|
|
$image_folder_type = array_search('setting',config('custom.image_folders')); //for image saved in folder |
|
|
|
$image_folder_type = array_search('setting',config('custom.image_folders')); //for image saved in folder |
|
|
|
$count = rand(100,999); |
|
|
|
$count = rand(100,999); |
|
|
|
$out_put_path = User::save_image(\request('value'),$extension,$count,$image_folder_type); |
|
|
|
$out_put_path = User::save_image(\request('value'),$extension,$count,$image_folder_type); |
|
|
|
$image_path = $out_put_path[0]; |
|
|
|
is_array($out_put_path) ? $image_path = $out_put_path[0] : $image_path = $out_put_path; |
|
|
|
$setting->value = $image_path; |
|
|
|
$setting->value = $image_path; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -126,7 +126,7 @@ class SettingController extends Controller |
|
|
|
if(request('type') == array_search('Image',config('custom.setting_types'))){ |
|
|
|
if(request('type') == array_search('Image',config('custom.setting_types'))){ |
|
|
|
if(\request('value')){ |
|
|
|
if(\request('value')){ |
|
|
|
$this->validate($request,[ |
|
|
|
$this->validate($request,[ |
|
|
|
'value'=>'required|file|mimes:jpeg,png,jpg,pdf' |
|
|
|
'value'=>'required|file|mimes:jpeg,png,jpg,pdf,mp4' |
|
|
|
] |
|
|
|
] |
|
|
|
); |
|
|
|
); |
|
|
|
|
|
|
|
|
|
|
@ -135,7 +135,7 @@ class SettingController extends Controller |
|
|
|
$image_folder_type = array_search('setting',config('custom.image_folders')); //for image saved in folder |
|
|
|
$image_folder_type = array_search('setting',config('custom.image_folders')); //for image saved in folder |
|
|
|
$count = rand(100,999); |
|
|
|
$count = rand(100,999); |
|
|
|
$out_put_path = User::save_image(\request('value'),$extension,$count,$image_folder_type); |
|
|
|
$out_put_path = User::save_image(\request('value'),$extension,$count,$image_folder_type); |
|
|
|
$image_path = $out_put_path[0]; |
|
|
|
is_array($out_put_path) ? $image_path = $out_put_path[0] : $image_path = $out_put_path; |
|
|
|
$setting->value = $image_path; |
|
|
|
$setting->value = $image_path; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|