Image in Laravel bug

my problem : i try to show the image in Laravel using the following code


        
   @foreach($data as $dat)
    <p>{{ $dat->name }}</p>
    <hr>
    <img src="{{ Storage::url($dat->avatar) }}" alt="">
    @endforeach 
  • i have linked the storage with the public

  • this how i save the image to data base with other data

public function createUser(CreateUserRequest $request){
        
        // dd($request);
    
        if($request->hasFile('avatar')){
            $image = $request->avatar;
            $path = Storage::disk('public')->put('avatar/',$request->file('avatar'));
            $userData = $request->all();
            $userData['avatar'] = $path;
            
            User::create($userData);
            return redirect()->back()->with('success_message','Success');
        }

        User::create($request->all());
            return redirect()->back()->with('success_message','Success');
        }
  • this is the string saved into data base
avatar/CU0TjohsMMm9VmmI1T3s1T1vUJkGjnXFlbvWejPT.jpg

the problem that i try the same code on my laptop the image showed correctly while on the pc i don’t know what is wrong