{"action":"opened","issue":{"url":"https://api.github.com/repos/laravel/framework/issues/12263","repository_url":"https://api.github.com/repos/laravel/framework","labels_url":"https://api.github.com/repos/laravel/framework/issues/12263/labels{/name}","comments_url":"https://api.github.com/repos/laravel/framework/issues/12263/comments","events_url":"https://api.github.com/repos/laravel/framework/issues/12263/events","html_url":"https://github.com/laravel/framework/issues/12263","id":133183275,"number":12263,"title":"Config:cache for default Laravel configuration creates absolute paths","user":{"login":"progmars","id":4199737,"avatar_url":"https://avatars.githubusercontent.com/u/4199737?v=3","gravatar_id":"","url":"https://api.github.com/users/progmars","html_url":"https://github.com/progmars","followers_url":"https://api.github.com/users/progmars/followers","following_url":"https://api.github.com/users/progmars/following{/other_user}","gists_url":"https://api.github.com/users/progmars/gists{/gist_id}","starred_url":"https://api.github.com/users/progmars/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/progmars/subscriptions","organizations_url":"https://api.github.com/users/progmars/orgs","repos_url":"https://api.github.com/users/progmars/repos","events_url":"https://api.github.com/users/progmars/events{/privacy}","received_events_url":"https://api.github.com/users/progmars/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-02-12T08:25:36Z","updated_at":"2016-02-12T08:25:36Z","closed_at":null,"body":"I noticed that when I run `php artisan config:cache` the resulting cache has absolute paths because by default there are some `storage_path()` calls in Laravel config files.\r\n\r\nI have read the documentation:\r\n\r\n> You should typically run the php artisan config:cache command as part of your production deployment routine.\r\n\r\nThe documentation does not say that I should run the command **on the server** and not on my automated CI build agent. But not everyone has access to `php artisan config:cache` command on their servers for executing it remotely from CI build agent.\r\n\r\nI think the documentation should be updated to reflect the requirement to run the command **on the server**. \r\nHowever, it would be even better to implement some way to generate config cache with relative paths.\r\n\r\nCurrently I could add a workaround for the issue and create a PHP controller which executes artisan command, and call it during deployment. But the problem is that on our server deployment is set up to work through Git push and only after a few minutes the web site gets synced with current version in the repository. I don't think it would be a good idea to just sit inside my CI deploy script and wait for unknown time just to be able to call URL to my custom controller which in turn executes `php artisan config:cache`. \r\n\r\nSo, we are back to the question - how to make the paths in config files relative to the app root and generate cached config which will work with relative paths?"}}