{"action":"created","issue":{"url":"https://api.github.com/repos/yiisoft/yii2/issues/16012","repository_url":"https://api.github.com/repos/yiisoft/yii2","labels_url":"https://api.github.com/repos/yiisoft/yii2/issues/16012/labels{/name}","comments_url":"https://api.github.com/repos/yiisoft/yii2/issues/16012/comments","events_url":"https://api.github.com/repos/yiisoft/yii2/issues/16012/events","html_url":"https://github.com/yiisoft/yii2/issues/16012","id":309998370,"number":16012,"title":"Let's add model Request and use it into action of Controllers","user":{"login":"githubjeka","id":874234,"avatar_url":"https://avatars3.githubusercontent.com/u/874234?v=4","gravatar_id":"","url":"https://api.github.com/users/githubjeka","html_url":"https://github.com/githubjeka","followers_url":"https://api.github.com/users/githubjeka/followers","following_url":"https://api.github.com/users/githubjeka/following{/other_user}","gists_url":"https://api.github.com/users/githubjeka/gists{/gist_id}","starred_url":"https://api.github.com/users/githubjeka/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/githubjeka/subscriptions","organizations_url":"https://api.github.com/users/githubjeka/orgs","repos_url":"https://api.github.com/users/githubjeka/repos","events_url":"https://api.github.com/users/githubjeka/events{/privacy}","received_events_url":"https://api.github.com/users/githubjeka/received_events","type":"User","site_admin":false},"labels":[{"id":33241821,"url":"https://api.github.com/repos/yiisoft/yii2/labels/status:under%20discussion","name":"status:under discussion","color":"f7c6c7","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/yiisoft/yii2/milestones/19","html_url":"https://github.com/yiisoft/yii2/milestone/19","labels_url":"https://api.github.com/repos/yiisoft/yii2/milestones/19/labels","id":1707188,"number":19,"title":"2.2.0","description":"","creator":{"login":"samdark","id":47294,"avatar_url":"https://avatars2.githubusercontent.com/u/47294?v=4","gravatar_id":"","url":"https://api.github.com/users/samdark","html_url":"https://github.com/samdark","followers_url":"https://api.github.com/users/samdark/followers","following_url":"https://api.github.com/users/samdark/following{/other_user}","gists_url":"https://api.github.com/users/samdark/gists{/gist_id}","starred_url":"https://api.github.com/users/samdark/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/samdark/subscriptions","organizations_url":"https://api.github.com/users/samdark/orgs","repos_url":"https://api.github.com/users/samdark/repos","events_url":"https://api.github.com/users/samdark/events{/privacy}","received_events_url":"https://api.github.com/users/samdark/received_events","type":"User","site_admin":false},"open_issues":3,"closed_issues":0,"state":"open","created_at":"2016-04-14T16:18:25Z","updated_at":"2018-03-30T09:28:33Z","due_on":null,"closed_at":null},"comments":3,"created_at":"2018-03-30T07:35:39Z","updated_at":"2018-03-31T10:28:55Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"Now:\r\n```php\r\npublic function actionUpdate($id) {\r\n    $request = Yii::$app->request->post();\r\n    $model = new FormRequest();\r\n    if ($model->load($request) && $model->validate()) {         \r\n         someProcess($model);\r\n    }\r\n    // ....\r\n}\r\n```\r\n\r\nPropose:\r\n\r\n```php\r\npublic function actionUpdate(FormRequest $model) {\r\n   /**\r\n    * $model always valid, if not throw BadRequestHttpException or user handler...\r\n    */\r\n   someProcess($model);\r\n}\r\n```\r\n\r\nYour thoughts ?"},"comment":{"url":"https://api.github.com/repos/yiisoft/yii2/issues/comments/377683165","html_url":"https://github.com/yiisoft/yii2/issues/16012#issuecomment-377683165","issue_url":"https://api.github.com/repos/yiisoft/yii2/issues/16012","id":377683165,"user":{"login":"rugabarbo","id":6429469,"avatar_url":"https://avatars0.githubusercontent.com/u/6429469?v=4","gravatar_id":"","url":"https://api.github.com/users/rugabarbo","html_url":"https://github.com/rugabarbo","followers_url":"https://api.github.com/users/rugabarbo/followers","following_url":"https://api.github.com/users/rugabarbo/following{/other_user}","gists_url":"https://api.github.com/users/rugabarbo/gists{/gist_id}","starred_url":"https://api.github.com/users/rugabarbo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rugabarbo/subscriptions","organizations_url":"https://api.github.com/users/rugabarbo/orgs","repos_url":"https://api.github.com/users/rugabarbo/repos","events_url":"https://api.github.com/users/rugabarbo/events{/privacy}","received_events_url":"https://api.github.com/users/rugabarbo/received_events","type":"User","site_admin":false},"created_at":"2018-03-31T10:28:55Z","updated_at":"2018-03-31T10:28:55Z","author_association":"CONTRIBUTOR","body":"Form, Request, POST/GET, Model...\r\n«All in one» as my shampoo.\r\nI think there's too much magic here."}}
{"actor":{"display_login":"rugabarbo"}}