How To Create An Ecommerce Store With Laravel in 2024 - Part 4

Поділитися
Вставка
  • Опубліковано 2 січ 2025

КОМЕНТАРІ • 3

  • @bluhuma1123
    @bluhuma1123 5 місяців тому

    Hello, i am a little stuck on @15:04 minute on your video, i do create the database table entry like you do "image_url" but when defining the image in database it wont show the image, it shows this little broken image icon with text of my product or category name.
    All my images are in C:\wamp64\www\Laravel\public\images
    and in phpmyadmin in the "image_url" table there is a entry that i made like \images\test.jpg just like you.
    otherwise inspecting the webpage i get "Failed to load resource: the server responded with a status of 404 (Not Found)"
    im not sure what other information i can provide.
    Hope to hear from you regarding this problem i have.
    Edit:
    I might be thinking that it wants to get the images from wamp www folder instead of \public\images
    will try to make a folder there called images and see what happens.
    Edit:Edit:
    Yes, this seemed to be the problem for me,
    could i ask how to make it take the images from laravel folder and not from www
    will leave this comment here for others if they get same problem that i had .

    • @mapilitmedia
      @mapilitmedia  5 місяців тому

      Hi, yes double check that you're calling the correct image in the view including the file extension.
      You can also try php artisan storage:link
      Also in the.env file you can check that the APP_URL value is correct and set to localhost:8000

    • @Bebonkin
      @Bebonkin 5 годин тому

      @@mapilitmedia I am having the same difficulty and the previous commenter. I have verified all of your suggestions with no success. The app can see the banner.jpg file in the root of the public directory but not in the /images directory. Is the a github repository to check my code against for this project?