<div id="gallery-images" class="container-fluid  mt-5">
    <h3>Gallery</h3>
    <div class="row ">
        <?php
        $directory =  ABSOLUTE_URL."public/assets/images/gallery/";
        $images = glob($directory . "*.*");
        foreach ($images as $im) { ?>
            <div class="col-lg-4 col-md-6 col-sm-12">
                <a href="<?=  str_replace(ABSOLUTE_URL,SITE_URL,$im); ?>" data-fancybox="group" data-caption="Beach Villa Home">
                    <img class="image_data" src="<?= str_replace(ABSOLUTE_URL,SITE_URL,$im); ?>" alt="Beach Villa Home">
                </a>
            </div>
        <?php } ?>
    </div>
</div>

<script>
    $('[data-fancybox]').fancybox({
        buttons: [
            'close'
        ],
        wheel: false,
        transitionEffect: "slide",
        loop: true,
        toolbar: false,
        clickContent: false
    });
</script>