Creating blog post with storing images

  Tue 05 / 09 / 2023

  Posted by: Talha Manzoor

Category : Laravel

Tags : php laravel , backend

Description

I wanted to create blog which can have multiple images and recommend me rich feature text editor and how to show these images in my blog post because blog can have many images at any location of blog , also I am trying to do store image this with spatie media library package,



  Answered by CDL

Yes there are many ways to do it, you can store multiple images inside single column like implode('|', $yourImagesArrayHere); then it will store images like img1.png|img2.png etc.

Other way is store them into the different table

Create Galleries table and store all the images with their foriegn keys.

In galleries table you can create img_name, post_id column and store your images.

Not Solved
  Comment   Share
0 Likes   0 Comments