Not showing image by id with laravel and ajax

Posted 10 months ago by LearnHunter

image path are insert into database

 <div class="col-lg-6 col-md-6">
          <span id="user_image" class="card-img-top"> </span>
 </div>

//show single data ajax part here
       function showData(id) {
          $.ajax({
              url: "{{ url('admin/users') }}" + '/' + id,
              type: "GET",
              dataType: "JSON",
            success: function(data) {
              $('#single-data').modal('show');
              $('.modal-title').text(data.name +' '+'Informations');
              $('#contactid').text(data.id); 
                $('#fullname').text(data.name);
              $('#contactemail').text(data.email);
              $('#contactnumber').text(data.phone);
              $('#whoreference').text(data.who_reference);
              $('#myreference').text(data.my_reference);
              $('#user_address').text(data.address);
              $('#user_create').text(data.created_at);
              $('#user_image').val(image);
            },
            error : function() {
                alert("Ghorar DIm");
            }
          });
        }  


Please sign in or create an account to participate in this conversation.