dimanche 9 juillet 2017

How to display images from storage path?

How to display images from storage folder (outside public) ? I stored my image files in storage/cover but unable to display it to view. My show method :

public function index() {
        $categories = Category::with('post')->orderBy('id', 'desc')->paginate(4);
        return view('dashboard/categories/index', compact('categories', $categories));
    }

The view :

<?php foreach ($categories as $cat): ?>
            <div class="col-xs-6 col-sm-4 col-md-3">
                <div class="blog-item">
                    <a href="" class="blog-img"><img src="" class="img-responsive" alt=""/></a>
                </div><!-- blog-item -->
            </div><!-- col-xs-6 -->
        <?php endforeach; ?>

That's all and thanks!



from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/2sDRgCL
via IFTTT

Aucun commentaire:

Enregistrer un commentaire