public function showImg($id) { header('Content-Type:image/png'); $item = Item::findorFail($id); echo $item->contents; }