{"action":"closed","issue":{"url":"https://api.github.com/repos/laravel/framework/issues/13569","repository_url":"https://api.github.com/repos/laravel/framework","labels_url":"https://api.github.com/repos/laravel/framework/issues/13569/labels{/name}","comments_url":"https://api.github.com/repos/laravel/framework/issues/13569/comments","events_url":"https://api.github.com/repos/laravel/framework/issues/13569/events","html_url":"https://github.com/laravel/framework/issues/13569","id":155003311,"number":13569,"title":"Cache where not working with variable","user":{"login":"ctf0","id":7388088,"avatar_url":"https://avatars.githubusercontent.com/u/7388088?v=3","gravatar_id":"","url":"https://api.github.com/users/ctf0","html_url":"https://github.com/ctf0","followers_url":"https://api.github.com/users/ctf0/followers","following_url":"https://api.github.com/users/ctf0/following{/other_user}","gists_url":"https://api.github.com/users/ctf0/gists{/gist_id}","starred_url":"https://api.github.com/users/ctf0/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ctf0/subscriptions","organizations_url":"https://api.github.com/users/ctf0/orgs","repos_url":"https://api.github.com/users/ctf0/repos","events_url":"https://api.github.com/users/ctf0/events{/privacy}","received_events_url":"https://api.github.com/users/ctf0/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2016-05-16T10:36:15Z","updated_at":"2016-05-16T15:47:40Z","closed_at":"2016-05-16T15:47:40Z","body":"here is an example to better illustrate what am facing\r\n\r\n```php\r\nRoute::group(['prefix' => 'api'], function () {\r\n    Route::get('{city_id}/towns', function ($city_id) {\r\n        Cache::rememberForever('town', function () {\r\n            return App\\Town::all();\r\n        });\r\n\r\n        // this doesn't work\r\n        return Cache::get('town')->where('city_id', $city_id)->all();\r\n\r\n        // but when specifying a number it works\r\n        return Cache::get('town')->where('city_id', 1)->all();\r\n    });\r\n});\r\n```"}}