php - Display Image in Laravel 4 -


i trying display image retrieved mysql databases, received image how display on bowser

i image in eloquent, show me name of photo in database not real data, go blade , set

{{form::open($file, array('files'=> true))}}

but show me "ca not display image because contains errors"

in controller file write function:

public function showimage($id){     $pr = db::table('products')->where('id', $id)->first();     $response['img'] =$pr->img;//blob file     $response['type']=$pr->image_type;     return view::make('products.show', compact('response')); } 

and in view file type this:

@extends('layouts.default')  @section('content')  <h1>show</h1>        <img src="data:{{$response['type']}};base64,{{$response['img']}}" />    @stop


Comments

Popular posts from this blog

Android layout hidden on keyboard show -

google app engine - 403 Forbidden POST - Flask WTForms -

c - Why would PK11_GenerateRandom() return an error -8023? -