{"action":"closed","issue":{"url":"https://api.github.com/repos/redooor/redminportal/issues/43","labels_url":"https://api.github.com/repos/redooor/redminportal/issues/43/labels{/name}","comments_url":"https://api.github.com/repos/redooor/redminportal/issues/43/comments","events_url":"https://api.github.com/repos/redooor/redminportal/issues/43/events","html_url":"https://github.com/redooor/redminportal/issues/43","id":53955402,"number":43,"title":"Image not showing in front end","user":{"login":"ulshamim","id":2345824,"avatar_url":"https://avatars.githubusercontent.com/u/2345824?v=3","gravatar_id":"","url":"https://api.github.com/users/ulshamim","html_url":"https://github.com/ulshamim","followers_url":"https://api.github.com/users/ulshamim/followers","following_url":"https://api.github.com/users/ulshamim/following{/other_user}","gists_url":"https://api.github.com/users/ulshamim/gists{/gist_id}","starred_url":"https://api.github.com/users/ulshamim/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ulshamim/subscriptions","organizations_url":"https://api.github.com/users/ulshamim/orgs","repos_url":"https://api.github.com/users/ulshamim/repos","events_url":"https://api.github.com/users/ulshamim/events{/privacy}","received_events_url":"https://api.github.com/users/ulshamim/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/redooor/redminportal/labels/help+wanted","name":"help wanted","color":"159818"}],"state":"closed","locked":false,"assignee":{"login":"kongnir","id":1088896,"avatar_url":"https://avatars.githubusercontent.com/u/1088896?v=3","gravatar_id":"","url":"https://api.github.com/users/kongnir","html_url":"https://github.com/kongnir","followers_url":"https://api.github.com/users/kongnir/followers","following_url":"https://api.github.com/users/kongnir/following{/other_user}","gists_url":"https://api.github.com/users/kongnir/gists{/gist_id}","starred_url":"https://api.github.com/users/kongnir/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kongnir/subscriptions","organizations_url":"https://api.github.com/users/kongnir/orgs","repos_url":"https://api.github.com/users/kongnir/repos","events_url":"https://api.github.com/users/kongnir/events{/privacy}","received_events_url":"https://api.github.com/users/kongnir/received_events","type":"User","site_admin":false},"milestone":null,"comments":4,"created_at":"2015-01-10T11:28:18Z","updated_at":"2015-01-12T11:36:37Z","closed_at":"2015-01-12T11:36:37Z","body":"I can't show product image in front end. It's working in back end. Please help.\r\n\r\nThese are the files:\r\n A) Model- \r\n1)Image.php\r\n~~~\r\nclass Image extends Eloquent {\r\n    public function imageable() {\r\n        return $this->morphTo();\r\n    }\r\n} \r\n~~~\r\n2) Product.php\r\n~~~\r\nclass Product extends Eloquent {\r\n    public function images() {\r\n        return $this->morphMany('Image', 'imageable');\r\n    }\r\n}\r\n~~~\r\n\r\nB) Controller-\r\n\r\n1) StoreController.php\r\n~~~\r\nclass StoreController extends BaseController {\r\n\r\n       public function getIndex() {\r\n        $products = Product::orderBy('category_id')->orderBy('name')->paginate(20);\r\n\r\n        return View::make('store.products')->with('products', $products)->with('imageUrl', 'assets/img/products/');\r\n    }\r\n}\r\n~~~\r\n\r\nC) View-\r\n\r\n1)products.blade.php\r\n\r\n~~~\r\n@extends('layouts.main')\r\n@section('content')\r\n\r\n\r\n<article id=\"grid\">\r\n   \r\n    <ul id=\"items\">\r\n        @foreach($products as $product)\r\n\r\n        <li>\r\n            <a href=\"/store/view/{{$product->id}}\">\r\n                \r\n                @foreach( Product::find($product->id)->images as $image )\r\n               \r\n                {{ HTML::image($imageUrl . $image->path, $product->name, array('class' => 'img-thumbnail', 'alt' => $image->path)) }}\r\n            </a>\r\n            @endforeach\r\n            <a href=\"/store/view/{{$product->id}}\" class=\"title\">{{$product->name}}</a>\r\n            <strong>&pound;{{$product->price}}</strong>\r\n        </li>\r\n        @endforeach\r\n    </ul>\r\n</article>\r\n@stop.\r\n\r\n~~~\r\n\r\nPlease help me.\r\n\r\n\r\n"}}