Friday, May 18, 2018

Loop image in controller - development

Loop image in controller

MY CODE IN CONTROLLER :

 public function image_item_name($inc) 
{
    if(isset($_POST['inc'])) {
        $inc = $_POST['inc'];
        $i = DB::select("SELECT file_name FROM tbl_image_item_name WHERE inc = '$inc';");

        foreach ($i as $a){ 

          echo '<img src="../../">';

        }
    }else {
        echo "Access Denied";
    }

The Problem :
I cannot to loop the image from database, please help me.



from Laravel Questions and Answers https://laravelquestions.com/laravel/loop-image-in-controller/
via Lzo Media

No comments:

Post a Comment