{"action":"opened","issue":{"url":"https://api.github.com/repos/spatie/laravel-medialibrary/issues/296","repository_url":"https://api.github.com/repos/spatie/laravel-medialibrary","labels_url":"https://api.github.com/repos/spatie/laravel-medialibrary/issues/296/labels{/name}","comments_url":"https://api.github.com/repos/spatie/laravel-medialibrary/issues/296/comments","events_url":"https://api.github.com/repos/spatie/laravel-medialibrary/issues/296/events","html_url":"https://github.com/spatie/laravel-medialibrary/issues/296","id":171520313,"number":296,"title":"Custom URL Generator","user":{"login":"timgavin","id":1012049,"avatar_url":"https://avatars.githubusercontent.com/u/1012049?v=3","gravatar_id":"","url":"https://api.github.com/users/timgavin","html_url":"https://github.com/timgavin","followers_url":"https://api.github.com/users/timgavin/followers","following_url":"https://api.github.com/users/timgavin/following{/other_user}","gists_url":"https://api.github.com/users/timgavin/gists{/gist_id}","starred_url":"https://api.github.com/users/timgavin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/timgavin/subscriptions","organizations_url":"https://api.github.com/users/timgavin/orgs","repos_url":"https://api.github.com/users/timgavin/repos","events_url":"https://api.github.com/users/timgavin/events{/privacy}","received_events_url":"https://api.github.com/users/timgavin/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-08-16T21:17:41Z","updated_at":"2016-08-16T21:17:41Z","closed_at":null,"body":"I'm struggling to implement a custom URL so that I may integrate it with your awesome `url-signer` package and get temporary URLs, like this: [https://timgavin.name/laravel/temporary-urls-in-laravel/](https://timgavin.name/laravel/temporary-urls-in-laravel/)\r\n\r\nFor now I'm just trying to figure it out. I've created a class at `App\\MyUrlGenerator` and edited `larval-medialibrary.php` by changing the `custom_url_generator_class` config to \r\n```\r\n'custom_url_generator_class' => App\\MyUrlGenerator::class\r\n```\r\n\r\nUnfortunately, when I try to view an image I'm receiving \r\n```\r\nClass App\\MyUrlGenerator doesn't exist \r\n(View: /Users/tim/Sites/laravel/resources/views/posts/show.blade.php)\r\n```\r\n\r\nAgain, I'm just trying to figure it out, so I've duplicated the `S3UrlGenerator` class just to see if it works...\r\n\r\n```\r\n<?php\r\n\r\nnamespace Spatie\\MediaLibrary\\UrlGenerator;\r\n\r\nclass MyUrlGenerator extends BaseUrlGenerator\r\n{\r\n    /**\r\n     * Get the url for the profile of a media item.\r\n     *\r\n     * @return string\r\n     */\r\n    public function getUrl() : string\r\n    {\r\n        return config('laravel-medialibrary.s3.domain').'/'.$this->getPathRelativeToRoot();\r\n    }\r\n}\r\n```\r\n\r\nWhat am I doing wrong?"}}
{"actor":{"display_login":"timgavin"}}