{"id":348,"date":"2018-02-25T18:08:48","date_gmt":"2018-02-25T18:08:48","guid":{"rendered":"https:\/\/alexrusin.com\/?p=348"},"modified":"2018-02-25T18:12:35","modified_gmt":"2018-02-25T18:12:35","slug":"using-local-and-public-disks","status":"publish","type":"post","link":"https:\/\/blog.alexrusin.com\/using-local-and-public-disks\/","title":{"rendered":"Using Local and Public Disks"},"content":{"rendered":"
Having vagrant run on Windows host machine may cause some problems with symbolic links. After trying to make symbolic links to work and failing, I decided to use public disk in development and local disk in production.<\/p>\n
php artisan storage:link\u00a0<\/strong>makes\u00a0symbolic link from “public\/storage” to “storage\/app\/public”.\u00a0 When developing on windows-vagrant this command will not work properly, however it works on the production Ubuntu server. The solution is not to run this command in development and swap local disk with public during development. <\/p>\n Having vagrant run on Windows host machine may cause some problems with symbolic links. After trying to make symbolic links to work and failing, I decided to use public disk in development and local disk in production. php artisan storage:link\u00a0makes\u00a0symbolic link from “public\/storage” to “storage\/app\/public”.\u00a0 When developing on windows-vagrant this command will not work properly,…<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_kad_post_transparent":"","_kad_post_title":"","_kad_post_layout":"","_kad_post_sidebar_id":"","_kad_post_content_style":"","_kad_post_vertical_padding":"","_kad_post_feature":"","_kad_post_feature_position":"","_kad_post_header":false,"_kad_post_footer":false,"footnotes":""},"categories":[12],"tags":[],"class_list":["post-348","post","type-post","status-publish","format-standard","hentry","category-laravel"],"yoast_head":"\n\r\n\/* config\/filesystems.php *\/\r\nreturn [\r\n 'default' => env('FILESYSTEM_DISC', 'local'),\r\n\r\n 'disks' => [\r\n\r\n 'local' => [\r\n 'driver' => 'local',\r\n 'root' => storage_path('app\/public'),\r\n ],\r\n\r\n 'public' => [\r\n 'driver' => 'local',\r\n 'root' => public_path('storage'),\r\n 'url' => env('APP_URL').'\/storage',\r\n 'visibility' => 'public',\r\n ]\r\n ]\r\n]\r\n<\/pre>\n
\r\n# .env file in development\r\nFILESYSTEM_DISC=public\r\n\r\n# .env file in production\r\nFILESYSTEM_DISC=local\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"