Question: i run the following function in (git-)bash under windows: 

```
function config_get_container_values() {

local project_name=$1
local container_name=$2

#local container_name="gitea"

echo "###"
buildcmd="jq -r \".containers[]."
echo "$buildcmd"
buildcmd="${buildcmd}${container_name}"
echo "$buildcmd"
buildcmd="${buildcmd}foobar"
echo "$buildcmd"
echo "###"

}

```

The output of this is the following. Whyever, after using the variable to extend the string, he starts to overwrite $buildcmd. I tried this also with everything in one line as well with the append command (=+). Everytime the same result.

```
###
jq -r ".containers[].
jq -r ".containers[].gitea
foobar".containers[].gitea
###

```

The really strange thing is: When i enable the line `local container_name="gitea"` everything works as expected. The output is: 

```
###
jq -r ".containers[].
jq -r ".containers[].gitea
jq -r ".containers[].giteafoobar
###

```

When i put this all into a news file, its also works as expected. So i think something goes wrong in the thousands of line before calling this function. Any idea, what could be cause of this behavior?

Regards

Dave

Answer: 
You should do with the following way:

```
public function Add_slider(Request $request)
{
     $this->validate($request, [
         'select_image'  => 'required'
     ]);
     $image = $request->file('select_image');         
     $extension = $image->getClientOriginalExtension();
     Storage::disk('public')->put($image->getFilename().'.'.$extension,  File::get($image));
     $content = new Sliders;
     if($request->file('select_image'))
     {
         $content->slider_image = $image->getFilename().'.'.$extension;;
         $content->save();         

         $check = Sliders::where('id', $content->id)->select('slider_image')->get();
         return back()->with('success', 'Image Uploaded Successfully')->with('path',$check);
     }
}

```

And in view blade file:

```
<img src="{{url($path[0]->slider_image)}}" alt="{{$path[0]->slider_image}}">

```
This returns only the filename:

```
Storage::disk('')->putFile('slider', $request->select_image);

```

Use this instead:

```
Sliders::create([
    'slider_image' => $request->file('select_image')->get(),
]);

```

Make sure the column type from database is binary/blob.