{"action":"created","issue":{"url":"https://api.github.com/repos/laravel/framework/issues/8928","labels_url":"https://api.github.com/repos/laravel/framework/issues/8928/labels{/name}","comments_url":"https://api.github.com/repos/laravel/framework/issues/8928/comments","events_url":"https://api.github.com/repos/laravel/framework/issues/8928/events","html_url":"https://github.com/laravel/framework/issues/8928","id":82362700,"number":8928,"title":"middleware options not getting through","user":{"login":"sebastiansipos90","id":11758652,"avatar_url":"https://avatars.githubusercontent.com/u/11758652?v=3","gravatar_id":"","url":"https://api.github.com/users/sebastiansipos90","html_url":"https://github.com/sebastiansipos90","followers_url":"https://api.github.com/users/sebastiansipos90/followers","following_url":"https://api.github.com/users/sebastiansipos90/following{/other_user}","gists_url":"https://api.github.com/users/sebastiansipos90/gists{/gist_id}","starred_url":"https://api.github.com/users/sebastiansipos90/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sebastiansipos90/subscriptions","organizations_url":"https://api.github.com/users/sebastiansipos90/orgs","repos_url":"https://api.github.com/users/sebastiansipos90/repos","events_url":"https://api.github.com/users/sebastiansipos90/events{/privacy}","received_events_url":"https://api.github.com/users/sebastiansipos90/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-05-29T10:06:14Z","updated_at":"2015-05-29T10:21:07Z","closed_at":"2015-05-29T10:20:56Z","body":"Hello,\r\n\r\nI have a problem using parameters on middleware on laravel 5.1@dev\r\nI've created a test scenario: composer create-project laravel/laravel --prefer-dist\r\nUpgraded to 5.1 following the instructions from here: http://laravel.com/docs/master/upgrade (only the two steps)\r\n```bash\r\n$ pa\r\nLaravel Framework version 5.1-dev\r\n...\r\n```\r\n\r\nOn App\\Http\\Controllers\\WelcomeController:\r\n```php\r\n/*...*/\r\nclass WelcomeController extends Controller {\r\n/*...*/\r\n\tpublic function __construct()\r\n\t{\r\n\t\t$this->middleware('guest', ['test', 'test2']);\r\n\t}\r\n/*...*/\r\n```\r\n\r\n\r\nOn App\\Http\\Middleware\\RedirectIfNotAuthenticated:\r\n```php\r\n/*...*/\r\nclass RedirectIfAuthenticated {\r\n/*...*/\r\n\tpublic function handle($request, Closure $next, $params)\r\n\t{\r\n\t\tprint_r($params);\r\n                /*\r\n\t\tif ($this->auth->check())\r\n\t\t{\r\n\t\t\treturn new RedirectResponse(url('/home'));\r\n\t\t}\r\n\r\n\t\treturn $next($request);\r\n                */\r\n\t}\r\n/*...*/\r\n```\r\n\r\nAnd I get:\r\n`Missing argument 3 for App\\Http\\Middleware\\RedirectIfAuthenticated::handle(), called in /home/sebi/workspace/5.1test/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php on line 125 and defined`\r\n\r\nAccording to this: \r\nhttp://laravel.com/api/master/Illuminate/Routing/Controller.html#method_middleware , I should get the parameters there. What does the \"options\" parameter mean?\r\n\r\nHowever, if I try the way specified here: http://laravel.com/docs/master/middleware#middleware-parameters , it all works. The problem is that I need that parameter to be in the constructor of the controller.\r\n\r\nI tried to implement this for users permissions, like in the example.\r\n\r\nI've tried to fix it myself, but there are multiple closures there and I don't have the time to debug.\r\n"},"comment":{"url":"https://api.github.com/repos/laravel/framework/issues/comments/106766493","html_url":"https://github.com/laravel/framework/issues/8928#issuecomment-106766493","issue_url":"https://api.github.com/repos/laravel/framework/issues/8928","id":106766493,"user":{"login":"GrahamCampbell","id":2829600,"avatar_url":"https://avatars.githubusercontent.com/u/2829600?v=3","gravatar_id":"","url":"https://api.github.com/users/GrahamCampbell","html_url":"https://github.com/GrahamCampbell","followers_url":"https://api.github.com/users/GrahamCampbell/followers","following_url":"https://api.github.com/users/GrahamCampbell/following{/other_user}","gists_url":"https://api.github.com/users/GrahamCampbell/gists{/gist_id}","starred_url":"https://api.github.com/users/GrahamCampbell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GrahamCampbell/subscriptions","organizations_url":"https://api.github.com/users/GrahamCampbell/orgs","repos_url":"https://api.github.com/users/GrahamCampbell/repos","events_url":"https://api.github.com/users/GrahamCampbell/events{/privacy}","received_events_url":"https://api.github.com/users/GrahamCampbell/received_events","type":"User","site_admin":false},"created_at":"2015-05-29T10:21:07Z","updated_at":"2015-05-29T10:21:07Z","body":"That's not how middleware params work?"}}