{"action":"created","issue":{"url":"https://api.github.com/repos/yiisoft/yii2/issues/8062","labels_url":"https://api.github.com/repos/yiisoft/yii2/issues/8062/labels{/name}","comments_url":"https://api.github.com/repos/yiisoft/yii2/issues/8062/comments","events_url":"https://api.github.com/repos/yiisoft/yii2/issues/8062/events","html_url":"https://github.com/yiisoft/yii2/issues/8062","id":68039674,"number":8062,"title":"AssetBundle in view file","user":{"login":"wangchj","id":1118410,"avatar_url":"https://avatars.githubusercontent.com/u/1118410?v=3","gravatar_id":"","url":"https://api.github.com/users/wangchj","html_url":"https://github.com/wangchj","followers_url":"https://api.github.com/users/wangchj/followers","following_url":"https://api.github.com/users/wangchj/following{/other_user}","gists_url":"https://api.github.com/users/wangchj/gists{/gist_id}","starred_url":"https://api.github.com/users/wangchj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wangchj/subscriptions","organizations_url":"https://api.github.com/users/wangchj/orgs","repos_url":"https://api.github.com/users/wangchj/repos","events_url":"https://api.github.com/users/wangchj/events{/privacy}","received_events_url":"https://api.github.com/users/wangchj/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2015-04-13T08:24:46Z","updated_at":"2015-04-13T16:27:41Z","closed_at":"2015-04-13T08:28:01Z","body":"I'd like to put a simple asset class, like the one below, in my one of my view file. The asset bundle has only one file `home.css`, which is stored in `app/views/site`.\r\n\r\n```php\r\nclass HomeAsset extends AssetBundle\r\n{\r\n    public $basePath = '@app/views/site';\r\n    public $css = [\r\n        'home.css',\r\n    ];\r\n    public $js = [];\r\n    public $depends = [];\r\n}\r\n\r\nHomeAsset::register($this);\r\n```\r\n\r\nThe problem is, the url for `home.css` is rendered as `/home.css`, which is unexpected since I've set `$basePath = '@app/views/site'`"},"comment":{"url":"https://api.github.com/repos/yiisoft/yii2/issues/comments/92417395","html_url":"https://github.com/yiisoft/yii2/issues/8062#issuecomment-92417395","issue_url":"https://api.github.com/repos/yiisoft/yii2/issues/8062","id":92417395,"user":{"login":"wangchj","id":1118410,"avatar_url":"https://avatars.githubusercontent.com/u/1118410?v=3","gravatar_id":"","url":"https://api.github.com/users/wangchj","html_url":"https://github.com/wangchj","followers_url":"https://api.github.com/users/wangchj/followers","following_url":"https://api.github.com/users/wangchj/following{/other_user}","gists_url":"https://api.github.com/users/wangchj/gists{/gist_id}","starred_url":"https://api.github.com/users/wangchj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wangchj/subscriptions","organizations_url":"https://api.github.com/users/wangchj/orgs","repos_url":"https://api.github.com/users/wangchj/repos","events_url":"https://api.github.com/users/wangchj/events{/privacy}","received_events_url":"https://api.github.com/users/wangchj/received_events","type":"User","site_admin":false},"created_at":"2015-04-13T16:27:41Z","updated_at":"2015-04-13T16:27:41Z","body":"Yes that worked. Sorry for the false alarm."}}