$pictures = glob(path('public') . 'uploads/galleries/' . $dir_name . '/' . '*.jpg');
Right now it only retrieves .jpg files from a directory. However, I want it to be retrieving .JPG, .png, .PNG or others too.
I wonder if *.jpg can be used like; *.jpg|*.JPG|*.png|*.PNG or if I can attach a regex which basically does the same thing.
If glob() doesn't support such use, what would you suggest for this task?