{"action":"created","issue":{"url":"https://api.github.com/repos/cviebrock/eloquent-sluggable/issues/199","labels_url":"https://api.github.com/repos/cviebrock/eloquent-sluggable/issues/199/labels{/name}","comments_url":"https://api.github.com/repos/cviebrock/eloquent-sluggable/issues/199/comments","events_url":"https://api.github.com/repos/cviebrock/eloquent-sluggable/issues/199/events","html_url":"https://github.com/cviebrock/eloquent-sluggable/issues/199","id":116801724,"number":199,"title":"Implementing this pack in my application is giving me error","user":{"login":"Unstinted","id":8928708,"avatar_url":"https://avatars.githubusercontent.com/u/8928708?v=3","gravatar_id":"","url":"https://api.github.com/users/Unstinted","html_url":"https://github.com/Unstinted","followers_url":"https://api.github.com/users/Unstinted/followers","following_url":"https://api.github.com/users/Unstinted/following{/other_user}","gists_url":"https://api.github.com/users/Unstinted/gists{/gist_id}","starred_url":"https://api.github.com/users/Unstinted/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Unstinted/subscriptions","organizations_url":"https://api.github.com/users/Unstinted/orgs","repos_url":"https://api.github.com/users/Unstinted/repos","events_url":"https://api.github.com/users/Unstinted/events{/privacy}","received_events_url":"https://api.github.com/users/Unstinted/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":10,"created_at":"2015-11-13T16:26:44Z","updated_at":"2015-11-20T21:09:49Z","closed_at":"2015-11-14T17:28:25Z","body":"Hello,\r\n\r\nPlease I need full implementation of this package in my application with laravel 4.2*. I want to know how I can implement the slug in my view file, controller and route.\r\n\r\nPlease I will love to read from you soon."},"comment":{"url":"https://api.github.com/repos/cviebrock/eloquent-sluggable/issues/comments/158524110","html_url":"https://github.com/cviebrock/eloquent-sluggable/issues/199#issuecomment-158524110","issue_url":"https://api.github.com/repos/cviebrock/eloquent-sluggable/issues/199","id":158524110,"user":{"login":"Unstinted","id":8928708,"avatar_url":"https://avatars.githubusercontent.com/u/8928708?v=3","gravatar_id":"","url":"https://api.github.com/users/Unstinted","html_url":"https://github.com/Unstinted","followers_url":"https://api.github.com/users/Unstinted/followers","following_url":"https://api.github.com/users/Unstinted/following{/other_user}","gists_url":"https://api.github.com/users/Unstinted/gists{/gist_id}","starred_url":"https://api.github.com/users/Unstinted/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Unstinted/subscriptions","organizations_url":"https://api.github.com/users/Unstinted/orgs","repos_url":"https://api.github.com/users/Unstinted/repos","events_url":"https://api.github.com/users/Unstinted/events{/privacy}","received_events_url":"https://api.github.com/users/Unstinted/received_events","type":"User","site_admin":false},"created_at":"2015-11-20T21:09:49Z","updated_at":"2015-11-20T21:09:49Z","body":"Here is my Code that links to another view page:\r\n<a href=\"/project/view/{{$project->id}}\"> \r\n\r\nHere is my Controller code:\r\n------ public function getView($id){\r\n    return View::make('project.view')\r\n        ->with('project', Project::find($id));\r\n} -----------\r\n\r\nThe above code works fine in getting the project id in the url but i want to display the slug in the Url that links to the view page:\r\n\r\n\r\npublic function getView($slug) {\r\n    $project = Project::where('slug',$slug)->get();\r\n    if ($project) {\r\n        return View::make('project.view')->with('project', $project);\r\n    }\r\n    // no model with that slug found ...\r\n}\r\nThe above code you gave me i used it as mention but it giveing me the following error in my laravel log message: Next exception 'ErrorException' with message 'Undefined property: Illuminate\\Database\\Eloquent\\Collection::$pname (View: C:\\xampp\\htdocs\\wpc\\app\\views\\project\\view.blade.php)'\r\n\r\n![mozilla firefox 2015-11-20 21 41 54](https://cloud.githubusercontent.com/assets/8928708/11311376/c8cdc134-8fcf-11e5-826d-83e3d62e00ac.png)\r\n--------------------\r\nPlease what can i do to make everything work well? It has been giving me bottle neck with my application.\r\nI can provide the view page code and the project page code if you need it.\r\n"}}