{"action":"opened","issue":{"url":"https://api.github.com/repos/laravel/framework/issues/13274","repository_url":"https://api.github.com/repos/laravel/framework","labels_url":"https://api.github.com/repos/laravel/framework/issues/13274/labels{/name}","comments_url":"https://api.github.com/repos/laravel/framework/issues/13274/comments","events_url":"https://api.github.com/repos/laravel/framework/issues/13274/events","html_url":"https://github.com/laravel/framework/issues/13274","id":150521424,"number":13274,"title":"offset method doesn't accept DB::raw","user":{"login":"3amprogrammer","id":15548650,"avatar_url":"https://avatars.githubusercontent.com/u/15548650?v=3","gravatar_id":"","url":"https://api.github.com/users/3amprogrammer","html_url":"https://github.com/3amprogrammer","followers_url":"https://api.github.com/users/3amprogrammer/followers","following_url":"https://api.github.com/users/3amprogrammer/following{/other_user}","gists_url":"https://api.github.com/users/3amprogrammer/gists{/gist_id}","starred_url":"https://api.github.com/users/3amprogrammer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/3amprogrammer/subscriptions","organizations_url":"https://api.github.com/users/3amprogrammer/orgs","repos_url":"https://api.github.com/users/3amprogrammer/repos","events_url":"https://api.github.com/users/3amprogrammer/events{/privacy}","received_events_url":"https://api.github.com/users/3amprogrammer/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-04-23T06:00:26Z","updated_at":"2016-04-23T06:00:26Z","closed_at":null,"body":"`offset` method requires int as a parameter. It would be nice if I can also pass an instance of Expression. \r\n\r\n```php\r\nreturn DB::table('question_categories')\r\n            ->select('id')\r\n            ->offset(DB::raw('floor(random() * (select count(*) from question_categories))'))\r\n            ->limit(1)\r\n            ->get();\r\n```"}}