{"id":560,"date":"2022-02-18T22:40:00","date_gmt":"2022-02-18T22:40:00","guid":{"rendered":"https:\/\/rishikantsri.in\/blog\/?p=560"},"modified":"2023-10-27T09:22:19","modified_gmt":"2023-10-27T09:22:19","slug":"config-filesystems-php","status":"publish","type":"post","link":"https:\/\/rishikantsri.in\/blog\/config-filesystems-php\/","title":{"rendered":"Config : filesystems.php"},"content":{"rendered":"\n<p>The code,  provided here, is a configuration file from Laravel 8 for handling filesystems. In this configuration file, you can define various filesystem disks, specify their properties, and set the default filesystem disk to be used by the framework. <\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:1.125rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#b392f0;--cbp-line-number-width:19.80000114440918px;line-height:1.625rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:flex;align-items:center;padding:16px 0 0 16px;width:100%;text-align:left;background-color:#1f1f1f\"><span style=\"background:#a37ced;padding:0.3rem 0.5rem 0.2rem;border-radius:1rem;font-size:0.8em;line-height:1;height:1.25rem;text-align:center;display:inline-flex;align-items:center;justify-content:center;color:#1f1f1f\">PHP<\/span><\/span><span role=\"button\" tabindex=\"0\" data-code=\"&lt;?php\n\nreturn [\n\n    \/*\n    |--------------------------------------------------------------------------\n    | Default Filesystem Disk\n    |--------------------------------------------------------------------------\n    |\n    | Here you may specify the default filesystem disk that should be used\n    | by the framework. The &quot;local&quot; disk, as well as a variety of cloud\n    | based disks are available to your application. Just store away!\n    |\n    *\/\n\n    'default' =&gt; env('FILESYSTEM_DRIVER', 'local'),\n\n    \/*\n    |--------------------------------------------------------------------------\n    | Filesystem Disks\n    |--------------------------------------------------------------------------\n    |\n    | Here you may configure as many filesystem &quot;disks&quot; as you wish, and you\n    | may even configure multiple disks of the same driver. Defaults have\n    | been setup for each driver as an example of the required options.\n    |\n    | Supported Drivers: &quot;local&quot;, &quot;ftp&quot;, &quot;sftp&quot;, &quot;s3&quot;\n    |\n    *\/\n\n    'disks' =&gt; [\n\n        'local' =&gt; [\n            'driver' =&gt; 'local',\n            'root' =&gt; storage_path('app'),\n        ],\n\n        'public' =&gt; [\n            'driver' =&gt; 'local',\n            'root' =&gt; storage_path('app\/public'),\n            'url' =&gt; env('APP_URL').'\/storage',\n            'visibility' =&gt; 'public',\n        ],\n\n        's3' =&gt; [\n            'driver' =&gt; 's3',\n            'key' =&gt; env('AWS_ACCESS_KEY_ID'),\n            'secret' =&gt; env('AWS_SECRET_ACCESS_KEY'),\n            'region' =&gt; env('AWS_DEFAULT_REGION'),\n            'bucket' =&gt; env('AWS_BUCKET'),\n            'url' =&gt; env('AWS_URL'),\n            'endpoint' =&gt; env('AWS_ENDPOINT'),\n            'use_path_style_endpoint' =&gt; env('AWS_USE_PATH_STYLE_ENDPOINT', false),\n        ],\n\n    ],\n\n    \/*\n    |--------------------------------------------------------------------------\n    | Symbolic Links\n    |--------------------------------------------------------------------------\n    |\n    | Here you may configure the symbolic links that will be created when the\n    | `storage:link` Artisan command is executed. The array keys should be\n    | the locations of the links and the values should be their targets.\n    |\n    *\/\n\n    'links' =&gt; [\n        public_path('storage') =&gt; storage_path('app\/public'),\n    ],\n\n];\n\" style=\"color:#b392f0;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M4.5 12.75l6 6 9-13.5\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6\"><\/path><\/svg><\/span><pre class=\"shiki min-dark\" style=\"background-color: #1f1f1f\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #F97583\">&lt;?<\/span><span style=\"color: #B392F0\">php<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #F97583\">return<\/span><span style=\"color: #B392F0\"> [<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #B392F0\">    <\/span><span style=\"color: #6B737C\">\/*<\/span><\/span>\n<span class=\"line\"><span style=\"color: #6B737C\">    |--------------------------------------------------------------------------<\/span><\/span>\n<span class=\"line\"><span style=\"color: #6B737C\">    | Default Filesystem Disk<\/span><\/span>\n<span class=\"line\"><span style=\"color: #6B737C\">    |--------------------------------------------------------------------------<\/span><\/span>\n<span class=\"line\"><span style=\"color: #6B737C\">    |<\/span><\/span>\n<span class=\"line\"><span style=\"color: #6B737C\">    | Here you may specify the default filesystem disk that should be used<\/span><\/span>\n<span class=\"line\"><span style=\"color: #6B737C\">    | by the framework. The &quot;local&quot; disk, as well as a variety of cloud<\/span><\/span>\n<span class=\"line\"><span style=\"color: #6B737C\">    | based disks are available to your application. Just store away!<\/span><\/span>\n<span class=\"line\"><span style=\"color: #6B737C\">    |<\/span><\/span>\n<span class=\"line\"><span style=\"color: #6B737C\">    *\/<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #B392F0\">    <\/span><span style=\"color: #FFAB70\">&#39;default&#39;<\/span><span style=\"color: #B392F0\"> <\/span><span style=\"color: #F97583\">=&gt;<\/span><span style=\"color: #B392F0\"> env<\/span><span style=\"color: #BBBBBB\">(<\/span><span style=\"color: #FFAB70\">&#39;FILESYSTEM_DRIVER&#39;<\/span><span style=\"color: #BBBBBB\">,<\/span><span style=\"color: #B392F0\"> <\/span><span style=\"color: #FFAB70\">&#39;local&#39;<\/span><span style=\"color: #BBBBBB\">),<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #B392F0\">    <\/span><span style=\"color: #6B737C\">\/*<\/span><\/span>\n<span class=\"line\"><span style=\"color: #6B737C\">    |--------------------------------------------------------------------------<\/span><\/span>\n<span class=\"line\"><span style=\"color: #6B737C\">    | Filesystem Disks<\/span><\/span>\n<span class=\"line\"><span style=\"color: #6B737C\">    |--------------------------------------------------------------------------<\/span><\/span>\n<span class=\"line\"><span style=\"color: #6B737C\">    |<\/span><\/span>\n<span class=\"line\"><span style=\"color: #6B737C\">    | Here you may configure as many filesystem &quot;disks&quot; as you wish, and you<\/span><\/span>\n<span class=\"line\"><span style=\"color: #6B737C\">    | may even configure multiple disks of the same driver. Defaults have<\/span><\/span>\n<span class=\"line\"><span style=\"color: #6B737C\">    | been setup for each driver as an example of the required options.<\/span><\/span>\n<span class=\"line\"><span style=\"color: #6B737C\">    |<\/span><\/span>\n<span class=\"line\"><span style=\"color: #6B737C\">    | Supported Drivers: &quot;local&quot;, &quot;ftp&quot;, &quot;sftp&quot;, &quot;s3&quot;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #6B737C\">    |<\/span><\/span>\n<span class=\"line\"><span style=\"color: #6B737C\">    *\/<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #B392F0\">    <\/span><span style=\"color: #FFAB70\">&#39;disks&#39;<\/span><span style=\"color: #B392F0\"> <\/span><span style=\"color: #F97583\">=&gt;<\/span><span style=\"color: #B392F0\"> [<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #B392F0\">        <\/span><span style=\"color: #FFAB70\">&#39;local&#39;<\/span><span style=\"color: #B392F0\"> <\/span><span style=\"color: #F97583\">=&gt;<\/span><span style=\"color: #B392F0\"> [<\/span><\/span>\n<span class=\"line\"><span style=\"color: #B392F0\">            <\/span><span style=\"color: #FFAB70\">&#39;driver&#39;<\/span><span style=\"color: #B392F0\"> <\/span><span style=\"color: #F97583\">=&gt;<\/span><span style=\"color: #B392F0\"> <\/span><span style=\"color: #FFAB70\">&#39;local&#39;<\/span><span style=\"color: #BBBBBB\">,<\/span><\/span>\n<span class=\"line\"><span style=\"color: #B392F0\">            <\/span><span style=\"color: #FFAB70\">&#39;root&#39;<\/span><span style=\"color: #B392F0\"> <\/span><span style=\"color: #F97583\">=&gt;<\/span><span style=\"color: #B392F0\"> storage_path<\/span><span style=\"color: #BBBBBB\">(<\/span><span style=\"color: #FFAB70\">&#39;app&#39;<\/span><span style=\"color: #BBBBBB\">),<\/span><\/span>\n<span class=\"line\"><span style=\"color: #B392F0\">        ]<\/span><span style=\"color: #BBBBBB\">,<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #B392F0\">        <\/span><span style=\"color: #FFAB70\">&#39;public&#39;<\/span><span style=\"color: #B392F0\"> <\/span><span style=\"color: #F97583\">=&gt;<\/span><span style=\"color: #B392F0\"> [<\/span><\/span>\n<span class=\"line\"><span style=\"color: #B392F0\">            <\/span><span style=\"color: #FFAB70\">&#39;driver&#39;<\/span><span style=\"color: #B392F0\"> <\/span><span style=\"color: #F97583\">=&gt;<\/span><span style=\"color: #B392F0\"> <\/span><span style=\"color: #FFAB70\">&#39;local&#39;<\/span><span style=\"color: #BBBBBB\">,<\/span><\/span>\n<span class=\"line\"><span style=\"color: #B392F0\">            <\/span><span style=\"color: #FFAB70\">&#39;root&#39;<\/span><span style=\"color: #B392F0\"> <\/span><span style=\"color: #F97583\">=&gt;<\/span><span style=\"color: #B392F0\"> storage_path<\/span><span style=\"color: #BBBBBB\">(<\/span><span style=\"color: #FFAB70\">&#39;app\/public&#39;<\/span><span style=\"color: #BBBBBB\">),<\/span><\/span>\n<span class=\"line\"><span style=\"color: #B392F0\">            <\/span><span style=\"color: #FFAB70\">&#39;url&#39;<\/span><span style=\"color: #B392F0\"> <\/span><span style=\"color: #F97583\">=&gt;<\/span><span style=\"color: #B392F0\"> env<\/span><span style=\"color: #BBBBBB\">(<\/span><span style=\"color: #FFAB70\">&#39;APP_URL&#39;<\/span><span style=\"color: #BBBBBB\">)<\/span><span style=\"color: #F97583\">.<\/span><span style=\"color: #FFAB70\">&#39;\/storage&#39;<\/span><span style=\"color: #BBBBBB\">,<\/span><\/span>\n<span class=\"line\"><span style=\"color: #B392F0\">            <\/span><span style=\"color: #FFAB70\">&#39;visibility&#39;<\/span><span style=\"color: #B392F0\"> <\/span><span style=\"color: #F97583\">=&gt;<\/span><span style=\"color: #B392F0\"> <\/span><span style=\"color: #FFAB70\">&#39;public&#39;<\/span><span style=\"color: #BBBBBB\">,<\/span><\/span>\n<span class=\"line\"><span style=\"color: #B392F0\">        ]<\/span><span style=\"color: #BBBBBB\">,<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #B392F0\">        <\/span><span style=\"color: #FFAB70\">&#39;s3&#39;<\/span><span style=\"color: #B392F0\"> <\/span><span style=\"color: #F97583\">=&gt;<\/span><span style=\"color: #B392F0\"> [<\/span><\/span>\n<span class=\"line\"><span style=\"color: #B392F0\">            <\/span><span style=\"color: #FFAB70\">&#39;driver&#39;<\/span><span style=\"color: #B392F0\"> <\/span><span style=\"color: #F97583\">=&gt;<\/span><span style=\"color: #B392F0\"> <\/span><span style=\"color: #FFAB70\">&#39;s3&#39;<\/span><span style=\"color: #BBBBBB\">,<\/span><\/span>\n<span class=\"line\"><span style=\"color: #B392F0\">            <\/span><span style=\"color: #FFAB70\">&#39;key&#39;<\/span><span style=\"color: #B392F0\"> <\/span><span style=\"color: #F97583\">=&gt;<\/span><span style=\"color: #B392F0\"> env<\/span><span style=\"color: #BBBBBB\">(<\/span><span style=\"color: #FFAB70\">&#39;AWS_ACCESS_KEY_ID&#39;<\/span><span style=\"color: #BBBBBB\">),<\/span><\/span>\n<span class=\"line\"><span style=\"color: #B392F0\">            <\/span><span style=\"color: #FFAB70\">&#39;secret&#39;<\/span><span style=\"color: #B392F0\"> <\/span><span style=\"color: #F97583\">=&gt;<\/span><span style=\"color: #B392F0\"> env<\/span><span style=\"color: #BBBBBB\">(<\/span><span style=\"color: #FFAB70\">&#39;AWS_SECRET_ACCESS_KEY&#39;<\/span><span style=\"color: #BBBBBB\">),<\/span><\/span>\n<span class=\"line\"><span style=\"color: #B392F0\">            <\/span><span style=\"color: #FFAB70\">&#39;region&#39;<\/span><span style=\"color: #B392F0\"> <\/span><span style=\"color: #F97583\">=&gt;<\/span><span style=\"color: #B392F0\"> env<\/span><span style=\"color: #BBBBBB\">(<\/span><span style=\"color: #FFAB70\">&#39;AWS_DEFAULT_REGION&#39;<\/span><span style=\"color: #BBBBBB\">),<\/span><\/span>\n<span class=\"line\"><span style=\"color: #B392F0\">            <\/span><span style=\"color: #FFAB70\">&#39;bucket&#39;<\/span><span style=\"color: #B392F0\"> <\/span><span style=\"color: #F97583\">=&gt;<\/span><span style=\"color: #B392F0\"> env<\/span><span style=\"color: #BBBBBB\">(<\/span><span style=\"color: #FFAB70\">&#39;AWS_BUCKET&#39;<\/span><span style=\"color: #BBBBBB\">),<\/span><\/span>\n<span class=\"line\"><span style=\"color: #B392F0\">            <\/span><span style=\"color: #FFAB70\">&#39;url&#39;<\/span><span style=\"color: #B392F0\"> <\/span><span style=\"color: #F97583\">=&gt;<\/span><span style=\"color: #B392F0\"> env<\/span><span style=\"color: #BBBBBB\">(<\/span><span style=\"color: #FFAB70\">&#39;AWS_URL&#39;<\/span><span style=\"color: #BBBBBB\">),<\/span><\/span>\n<span class=\"line\"><span style=\"color: #B392F0\">            <\/span><span style=\"color: #FFAB70\">&#39;endpoint&#39;<\/span><span style=\"color: #B392F0\"> <\/span><span style=\"color: #F97583\">=&gt;<\/span><span style=\"color: #B392F0\"> env<\/span><span style=\"color: #BBBBBB\">(<\/span><span style=\"color: #FFAB70\">&#39;AWS_ENDPOINT&#39;<\/span><span style=\"color: #BBBBBB\">),<\/span><\/span>\n<span class=\"line\"><span style=\"color: #B392F0\">            <\/span><span style=\"color: #FFAB70\">&#39;use_path_style_endpoint&#39;<\/span><span style=\"color: #B392F0\"> <\/span><span style=\"color: #F97583\">=&gt;<\/span><span style=\"color: #B392F0\"> env<\/span><span style=\"color: #BBBBBB\">(<\/span><span style=\"color: #FFAB70\">&#39;AWS_USE_PATH_STYLE_ENDPOINT&#39;<\/span><span style=\"color: #BBBBBB\">,<\/span><span style=\"color: #B392F0\"> <\/span><span style=\"color: #79B8FF\">false<\/span><span style=\"color: #BBBBBB\">),<\/span><\/span>\n<span class=\"line\"><span style=\"color: #B392F0\">        ]<\/span><span style=\"color: #BBBBBB\">,<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #B392F0\">    ]<\/span><span style=\"color: #BBBBBB\">,<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #B392F0\">    <\/span><span style=\"color: #6B737C\">\/*<\/span><\/span>\n<span class=\"line\"><span style=\"color: #6B737C\">    |--------------------------------------------------------------------------<\/span><\/span>\n<span class=\"line\"><span style=\"color: #6B737C\">    | Symbolic Links<\/span><\/span>\n<span class=\"line\"><span style=\"color: #6B737C\">    |--------------------------------------------------------------------------<\/span><\/span>\n<span class=\"line\"><span style=\"color: #6B737C\">    |<\/span><\/span>\n<span class=\"line\"><span style=\"color: #6B737C\">    | Here you may configure the symbolic links that will be created when the<\/span><\/span>\n<span class=\"line\"><span style=\"color: #6B737C\">    | `storage:link` Artisan command is executed. The array keys should be<\/span><\/span>\n<span class=\"line\"><span style=\"color: #6B737C\">    | the locations of the links and the values should be their targets.<\/span><\/span>\n<span class=\"line\"><span style=\"color: #6B737C\">    |<\/span><\/span>\n<span class=\"line\"><span style=\"color: #6B737C\">    *\/<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #B392F0\">    <\/span><span style=\"color: #FFAB70\">&#39;links&#39;<\/span><span style=\"color: #B392F0\"> <\/span><span style=\"color: #F97583\">=&gt;<\/span><span style=\"color: #B392F0\"> [<\/span><\/span>\n<span class=\"line\"><span style=\"color: #B392F0\">        public_path<\/span><span style=\"color: #BBBBBB\">(<\/span><span style=\"color: #FFAB70\">&#39;storage&#39;<\/span><span style=\"color: #BBBBBB\">)<\/span><span style=\"color: #B392F0\"> <\/span><span style=\"color: #F97583\">=&gt;<\/span><span style=\"color: #B392F0\"> storage_path<\/span><span style=\"color: #BBBBBB\">(<\/span><span style=\"color: #FFAB70\">&#39;app\/public&#39;<\/span><span style=\"color: #BBBBBB\">),<\/span><\/span>\n<span class=\"line\"><span style=\"color: #B392F0\">    ]<\/span><span style=\"color: #BBBBBB\">,<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #B392F0\">];<\/span><\/span>\n<span class=\"line\"><\/span><\/code><\/pre><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">Step 1: Default Filesystem Disk<\/h3>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:1.125rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#b392f0;--cbp-line-number-width:9.899993896484375px;line-height:1.625rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:flex;align-items:center;padding:16px 0 0 16px;width:100%;text-align:left;background-color:#1f1f1f\"><span style=\"background:#a37ced;padding:0.3rem 0.5rem 0.2rem;border-radius:1rem;font-size:0.8em;line-height:1;height:1.25rem;text-align:center;display:inline-flex;align-items:center;justify-content:center;color:#1f1f1f\">PHP<\/span><\/span><span role=\"button\" tabindex=\"0\" data-code=\"'default' =&gt; env('FILESYSTEM_DRIVER', 'local'),\" style=\"color:#b392f0;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M4.5 12.75l6 6 9-13.5\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6\"><\/path><\/svg><\/span><pre class=\"shiki min-dark\" style=\"background-color: #1f1f1f\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #FFAB70\">&#39;default&#39;<\/span><span style=\"color: #B392F0\"> <\/span><span style=\"color: #F97583\">=&gt;<\/span><span style=\"color: #B392F0\"> env<\/span><span style=\"color: #BBBBBB\">(<\/span><span style=\"color: #FFAB70\">&#39;FILESYSTEM_DRIVER&#39;<\/span><span style=\"color: #BBBBBB\">,<\/span><span style=\"color: #B392F0\"> <\/span><span style=\"color: #FFAB70\">&#39;local&#39;<\/span><span style=\"color: #BBBBBB\">),<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<ul>\n<li>This section specifies the default filesystem disk that should be used by the framework. The <code>env<\/code> function is used to retrieve an environment variable, and it defaults to &#8216;local&#8217; if the &#8216;FILESYSTEM_DRIVER&#8217; environment variable is not set.<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">Step 2: Filesystem Disks<\/h3>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:1.125rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#b392f0;--cbp-line-number-width:9.90000057220459px;line-height:1.625rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:flex;align-items:center;padding:16px 0 0 16px;width:100%;text-align:left;background-color:#1f1f1f\"><span style=\"background:#a37ced;padding:0.3rem 0.5rem 0.2rem;border-radius:1rem;font-size:0.8em;line-height:1;height:1.25rem;text-align:center;display:inline-flex;align-items:center;justify-content:center;color:#1f1f1f\">PHP<\/span><\/span><span role=\"button\" tabindex=\"0\" data-code=\"'disks' =&gt; [\n    \/\/ ...\n]\" style=\"color:#b392f0;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M4.5 12.75l6 6 9-13.5\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6\"><\/path><\/svg><\/span><pre class=\"shiki min-dark\" style=\"background-color: #1f1f1f\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #FFAB70\">&#39;disks&#39;<\/span><span style=\"color: #B392F0\"> <\/span><span style=\"color: #F97583\">=&gt;<\/span><span style=\"color: #B392F0\"> [<\/span><\/span>\n<span class=\"line\"><span style=\"color: #B392F0\">    <\/span><span style=\"color: #6B737C\">\/\/ ...<\/span><\/span>\n<span class=\"line\"><span style=\"color: #B392F0\">]<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<ul>\n<li>This section allows you to configure multiple filesystem disks. Laravel supports different drivers like &#8216;local&#8217;, &#8216;ftp&#8217;, &#8216;sftp&#8217;, and &#8216;s3&#8217; for storing and retrieving files.<\/li>\n<\/ul>\n\n\n\n<h4 class=\"wp-block-heading\">&#8216;local&#8217; Disk<\/h4>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:1.125rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#b392f0;--cbp-line-number-width:9.899999618530273px;line-height:1.625rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:flex;align-items:center;padding:16px 0 0 16px;width:100%;text-align:left;background-color:#1f1f1f\"><span style=\"background:#a37ced;padding:0.3rem 0.5rem 0.2rem;border-radius:1rem;font-size:0.8em;line-height:1;height:1.25rem;text-align:center;display:inline-flex;align-items:center;justify-content:center;color:#1f1f1f\">PHP<\/span><\/span><span role=\"button\" tabindex=\"0\" data-code=\"'local' =&gt; [\n    'driver' =&gt; 'local',\n    'root' =&gt; storage_path('app'),\n],\" style=\"color:#b392f0;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M4.5 12.75l6 6 9-13.5\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6\"><\/path><\/svg><\/span><pre class=\"shiki min-dark\" style=\"background-color: #1f1f1f\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #FFAB70\">&#39;local&#39;<\/span><span style=\"color: #B392F0\"> <\/span><span style=\"color: #F97583\">=&gt;<\/span><span style=\"color: #B392F0\"> [<\/span><\/span>\n<span class=\"line\"><span style=\"color: #B392F0\">    <\/span><span style=\"color: #FFAB70\">&#39;driver&#39;<\/span><span style=\"color: #B392F0\"> <\/span><span style=\"color: #F97583\">=&gt;<\/span><span style=\"color: #B392F0\"> <\/span><span style=\"color: #FFAB70\">&#39;local&#39;<\/span><span style=\"color: #BBBBBB\">,<\/span><\/span>\n<span class=\"line\"><span style=\"color: #B392F0\">    <\/span><span style=\"color: #FFAB70\">&#39;root&#39;<\/span><span style=\"color: #B392F0\"> <\/span><span style=\"color: #F97583\">=&gt;<\/span><span style=\"color: #B392F0\"> storage_path<\/span><span style=\"color: #BBBBBB\">(<\/span><span style=\"color: #FFAB70\">&#39;app&#39;<\/span><span style=\"color: #BBBBBB\">),<\/span><\/span>\n<span class=\"line\"><span style=\"color: #B392F0\">]<\/span><span style=\"color: #BBBBBB\">,<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<ul>\n<li>This section configures a disk named &#8216;local&#8217; with the &#8216;local&#8217; driver. The &#8216;root&#8217; parameter defines the root directory for this disk, which is typically &#8216;storage\/app&#8217;.<\/li>\n<\/ul>\n\n\n\n<h4 class=\"wp-block-heading\">&#8216;public&#8217; Disk<\/h4>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:1.125rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#b392f0;--cbp-line-number-width:9.899999618530273px;line-height:1.625rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:flex;align-items:center;padding:16px 0 0 16px;width:100%;text-align:left;background-color:#1f1f1f\"><span style=\"background:#a37ced;padding:0.3rem 0.5rem 0.2rem;border-radius:1rem;font-size:0.8em;line-height:1;height:1.25rem;text-align:center;display:inline-flex;align-items:center;justify-content:center;color:#1f1f1f\">PHP<\/span><\/span><span role=\"button\" tabindex=\"0\" data-code=\"'public' =&gt; [\n    'driver' =&gt; 'local',\n    'root' =&gt; storage_path('app\/public'),\n    'url' =&gt; env('APP_URL').'\/storage',\n    'visibility' =&gt; 'public',\n],\" style=\"color:#b392f0;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M4.5 12.75l6 6 9-13.5\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6\"><\/path><\/svg><\/span><pre class=\"shiki min-dark\" style=\"background-color: #1f1f1f\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #FFAB70\">&#39;public&#39;<\/span><span style=\"color: #B392F0\"> <\/span><span style=\"color: #F97583\">=&gt;<\/span><span style=\"color: #B392F0\"> [<\/span><\/span>\n<span class=\"line\"><span style=\"color: #B392F0\">    <\/span><span style=\"color: #FFAB70\">&#39;driver&#39;<\/span><span style=\"color: #B392F0\"> <\/span><span style=\"color: #F97583\">=&gt;<\/span><span style=\"color: #B392F0\"> <\/span><span style=\"color: #FFAB70\">&#39;local&#39;<\/span><span style=\"color: #BBBBBB\">,<\/span><\/span>\n<span class=\"line\"><span style=\"color: #B392F0\">    <\/span><span style=\"color: #FFAB70\">&#39;root&#39;<\/span><span style=\"color: #B392F0\"> <\/span><span style=\"color: #F97583\">=&gt;<\/span><span style=\"color: #B392F0\"> storage_path<\/span><span style=\"color: #BBBBBB\">(<\/span><span style=\"color: #FFAB70\">&#39;app\/public&#39;<\/span><span style=\"color: #BBBBBB\">),<\/span><\/span>\n<span class=\"line\"><span style=\"color: #B392F0\">    <\/span><span style=\"color: #FFAB70\">&#39;url&#39;<\/span><span style=\"color: #B392F0\"> <\/span><span style=\"color: #F97583\">=&gt;<\/span><span style=\"color: #B392F0\"> env<\/span><span style=\"color: #BBBBBB\">(<\/span><span style=\"color: #FFAB70\">&#39;APP_URL&#39;<\/span><span style=\"color: #BBBBBB\">)<\/span><span style=\"color: #F97583\">.<\/span><span style=\"color: #FFAB70\">&#39;\/storage&#39;<\/span><span style=\"color: #BBBBBB\">,<\/span><\/span>\n<span class=\"line\"><span style=\"color: #B392F0\">    <\/span><span style=\"color: #FFAB70\">&#39;visibility&#39;<\/span><span style=\"color: #B392F0\"> <\/span><span style=\"color: #F97583\">=&gt;<\/span><span style=\"color: #B392F0\"> <\/span><span style=\"color: #FFAB70\">&#39;public&#39;<\/span><span style=\"color: #BBBBBB\">,<\/span><\/span>\n<span class=\"line\"><span style=\"color: #B392F0\">]<\/span><span style=\"color: #BBBBBB\">,<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<ul>\n<li>Here, a disk named &#8216;public&#8217; is configured. It uses the &#8216;local&#8217; driver and sets the root directory to &#8216;storage\/app\/public&#8217;. The &#8216;url&#8217; parameter specifies the public URL for files stored in this disk. &#8216;visibility&#8217; is set to &#8216;public&#8217;, indicating that files stored in this disk are publicly accessible.<\/li>\n<\/ul>\n\n\n\n<h4 class=\"wp-block-heading\">&#8216;s3&#8217; Disk<\/h4>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:1.125rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#b392f0;--cbp-line-number-width:19.80000114440918px;line-height:1.625rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:flex;align-items:center;padding:16px 0 0 16px;width:100%;text-align:left;background-color:#1f1f1f\"><span style=\"background:#a37ced;padding:0.3rem 0.5rem 0.2rem;border-radius:1rem;font-size:0.8em;line-height:1;height:1.25rem;text-align:center;display:inline-flex;align-items:center;justify-content:center;color:#1f1f1f\">PHP<\/span><\/span><span role=\"button\" tabindex=\"0\" data-code=\"'s3' =&gt; [\n    'driver' =&gt; 's3',\n    'key' =&gt; env('AWS_ACCESS_KEY_ID'),\n    'secret' =&gt; env('AWS_SECRET_ACCESS_KEY'),\n    'region' =&gt; env('AWS_DEFAULT_REGION'),\n    'bucket' =&gt; env('AWS_BUCKET'),\n    'url' =&gt; env('AWS_URL'),\n    'endpoint' =&gt; env('AWS_ENDPOINT'),\n    'use_path_style_endpoint' =&gt; env('AWS_USE_PATH_STYLE_ENDPOINT', false),\n],\" style=\"color:#b392f0;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M4.5 12.75l6 6 9-13.5\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6\"><\/path><\/svg><\/span><pre class=\"shiki min-dark\" style=\"background-color: #1f1f1f\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #FFAB70\">&#39;s3&#39;<\/span><span style=\"color: #B392F0\"> <\/span><span style=\"color: #F97583\">=&gt;<\/span><span style=\"color: #B392F0\"> [<\/span><\/span>\n<span class=\"line\"><span style=\"color: #B392F0\">    <\/span><span style=\"color: #FFAB70\">&#39;driver&#39;<\/span><span style=\"color: #B392F0\"> <\/span><span style=\"color: #F97583\">=&gt;<\/span><span style=\"color: #B392F0\"> <\/span><span style=\"color: #FFAB70\">&#39;s3&#39;<\/span><span style=\"color: #BBBBBB\">,<\/span><\/span>\n<span class=\"line\"><span style=\"color: #B392F0\">    <\/span><span style=\"color: #FFAB70\">&#39;key&#39;<\/span><span style=\"color: #B392F0\"> <\/span><span style=\"color: #F97583\">=&gt;<\/span><span style=\"color: #B392F0\"> env<\/span><span style=\"color: #BBBBBB\">(<\/span><span style=\"color: #FFAB70\">&#39;AWS_ACCESS_KEY_ID&#39;<\/span><span style=\"color: #BBBBBB\">),<\/span><\/span>\n<span class=\"line\"><span style=\"color: #B392F0\">    <\/span><span style=\"color: #FFAB70\">&#39;secret&#39;<\/span><span style=\"color: #B392F0\"> <\/span><span style=\"color: #F97583\">=&gt;<\/span><span style=\"color: #B392F0\"> env<\/span><span style=\"color: #BBBBBB\">(<\/span><span style=\"color: #FFAB70\">&#39;AWS_SECRET_ACCESS_KEY&#39;<\/span><span style=\"color: #BBBBBB\">),<\/span><\/span>\n<span class=\"line\"><span style=\"color: #B392F0\">    <\/span><span style=\"color: #FFAB70\">&#39;region&#39;<\/span><span style=\"color: #B392F0\"> <\/span><span style=\"color: #F97583\">=&gt;<\/span><span style=\"color: #B392F0\"> env<\/span><span style=\"color: #BBBBBB\">(<\/span><span style=\"color: #FFAB70\">&#39;AWS_DEFAULT_REGION&#39;<\/span><span style=\"color: #BBBBBB\">),<\/span><\/span>\n<span class=\"line\"><span style=\"color: #B392F0\">    <\/span><span style=\"color: #FFAB70\">&#39;bucket&#39;<\/span><span style=\"color: #B392F0\"> <\/span><span style=\"color: #F97583\">=&gt;<\/span><span style=\"color: #B392F0\"> env<\/span><span style=\"color: #BBBBBB\">(<\/span><span style=\"color: #FFAB70\">&#39;AWS_BUCKET&#39;<\/span><span style=\"color: #BBBBBB\">),<\/span><\/span>\n<span class=\"line\"><span style=\"color: #B392F0\">    <\/span><span style=\"color: #FFAB70\">&#39;url&#39;<\/span><span style=\"color: #B392F0\"> <\/span><span style=\"color: #F97583\">=&gt;<\/span><span style=\"color: #B392F0\"> env<\/span><span style=\"color: #BBBBBB\">(<\/span><span style=\"color: #FFAB70\">&#39;AWS_URL&#39;<\/span><span style=\"color: #BBBBBB\">),<\/span><\/span>\n<span class=\"line\"><span style=\"color: #B392F0\">    <\/span><span style=\"color: #FFAB70\">&#39;endpoint&#39;<\/span><span style=\"color: #B392F0\"> <\/span><span style=\"color: #F97583\">=&gt;<\/span><span style=\"color: #B392F0\"> env<\/span><span style=\"color: #BBBBBB\">(<\/span><span style=\"color: #FFAB70\">&#39;AWS_ENDPOINT&#39;<\/span><span style=\"color: #BBBBBB\">),<\/span><\/span>\n<span class=\"line\"><span style=\"color: #B392F0\">    <\/span><span style=\"color: #FFAB70\">&#39;use_path_style_endpoint&#39;<\/span><span style=\"color: #B392F0\"> <\/span><span style=\"color: #F97583\">=&gt;<\/span><span style=\"color: #B392F0\"> env<\/span><span style=\"color: #BBBBBB\">(<\/span><span style=\"color: #FFAB70\">&#39;AWS_USE_PATH_STYLE_ENDPOINT&#39;<\/span><span style=\"color: #BBBBBB\">,<\/span><span style=\"color: #B392F0\"> <\/span><span style=\"color: #79B8FF\">false<\/span><span style=\"color: #BBBBBB\">),<\/span><\/span>\n<span class=\"line\"><span style=\"color: #B392F0\">]<\/span><span style=\"color: #BBBBBB\">,<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<ul>\n<li>This section configures an &#8216;s3&#8217; disk for storing files on Amazon S3. It uses the &#8216;s3&#8217; driver and requires various settings like access key, secret key, region, bucket name, URL, and endpoint for the S3 service.<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">Step 3: Symbolic Links<\/h3>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:1.125rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#b392f0;--cbp-line-number-width:9.899999618530273px;line-height:1.625rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:flex;align-items:center;padding:16px 0 0 16px;width:100%;text-align:left;background-color:#1f1f1f\"><span style=\"background:#a37ced;padding:0.3rem 0.5rem 0.2rem;border-radius:1rem;font-size:0.8em;line-height:1;height:1.25rem;text-align:center;display:inline-flex;align-items:center;justify-content:center;color:#1f1f1f\">PHP<\/span><\/span><span role=\"button\" tabindex=\"0\" data-code=\"'links' =&gt; [\n    public_path('storage') =&gt; storage_path('app\/public'),\n],\" style=\"color:#b392f0;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M4.5 12.75l6 6 9-13.5\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6\"><\/path><\/svg><\/span><pre class=\"shiki min-dark\" style=\"background-color: #1f1f1f\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #FFAB70\">&#39;links&#39;<\/span><span style=\"color: #B392F0\"> <\/span><span style=\"color: #F97583\">=&gt;<\/span><span style=\"color: #B392F0\"> [<\/span><\/span>\n<span class=\"line\"><span style=\"color: #B392F0\">    public_path<\/span><span style=\"color: #BBBBBB\">(<\/span><span style=\"color: #FFAB70\">&#39;storage&#39;<\/span><span style=\"color: #BBBBBB\">)<\/span><span style=\"color: #B392F0\"> <\/span><span style=\"color: #F97583\">=&gt;<\/span><span style=\"color: #B392F0\"> storage_path<\/span><span style=\"color: #BBBBBB\">(<\/span><span style=\"color: #FFAB70\">&#39;app\/public&#39;<\/span><span style=\"color: #BBBBBB\">),<\/span><\/span>\n<span class=\"line\"><span style=\"color: #B392F0\">]<\/span><span style=\"color: #BBBBBB\">,<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<ul>\n<li>This section defines symbolic links that will be created when the <code>storage:link<\/code> Artisan command is executed. It specifies the location of the link and its target. In this example, it creates a symbolic link from &#8216;public\/storage&#8217; to &#8216;storage\/app\/public&#8217;.<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">Usage Examples:<\/h3>\n\n\n\n<ol>\n<li><strong>Default Filesystem Disk<\/strong>: You can use the default filesystem disk to store and retrieve files in your application. For example, when you upload a user&#8217;s profile picture, it might be stored in the &#8216;local&#8217; disk by default.<\/li>\n\n\n\n<li><strong>Multiple Disks<\/strong>: You can use different disks for different purposes. For instance, you might use the &#8216;public&#8217; disk for storing user-generated content that needs to be publicly accessible, and the &#8216;s3&#8217; disk for storing backups or sensitive files on Amazon S3.<\/li>\n\n\n\n<li><strong>Symbolic Links<\/strong>: When you run the <code>php artisan storage:link<\/code> command, symbolic links will be created. For example, you can create a symbolic link from &#8216;public\/storage&#8217; to &#8216;storage\/app\/public&#8217;, allowing you to serve files from &#8216;public\/storage&#8217; to the web.<\/li>\n<\/ol>\n\n\n\n<h3 class=\"wp-block-heading\">Pros and Cons:<\/h3>\n\n\n\n<p><strong>Pros<\/strong>:<\/p>\n\n\n\n<ol>\n<li><strong>Abstraction<\/strong>: Laravel&#8217;s filesystem abstraction makes it easy to work with files and storage across different platforms and drivers without changing your code.<\/li>\n\n\n\n<li><strong>Configurability<\/strong>: You can easily configure and switch between different storage solutions (local, FTP, S3, etc.) based on your application&#8217;s needs.<\/li>\n\n\n\n<li><strong>Symbolic Links<\/strong>: Laravel provides a convenient way to create symbolic links, making it simple to serve files to the web.<\/li>\n\n\n\n<li><strong>Environment Variables<\/strong>: The use of environment variables for configuration allows for flexibility and security.<\/li>\n<\/ol>\n\n\n\n<p><strong>Cons<\/strong>:<\/p>\n\n\n\n<ol>\n<li><strong>Complexity<\/strong>: Managing multiple disks and their configurations can become complex in large applications.<\/li>\n\n\n\n<li><strong>External Dependencies<\/strong>: When using cloud storage drivers like Amazon S3, your application&#8217;s file storage is dependent on external services, which may introduce additional complexity and cost.<\/li>\n\n\n\n<li><strong>Learning Curve<\/strong>: For developers new to Laravel, understanding the filesystem configuration and how to use different disks can be challenging.<\/li>\n<\/ol>\n\n\n\n<p>In summary, this Laravel 8 filesystem configuration allows you to define and manage various storage disks with different drivers and settings, making it versatile and adaptable to your application&#8217;s needs. It simplifies file storage and retrieval while providing flexibility and configurability. However, it&#8217;s important to carefully choose the right storage solution based on your project&#8217;s requirements and to consider the potential complexities of managing multiple disks and external dependencies.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The code, provided here, is a configuration file from Laravel 8 for handling filesystems. In this configuration file, you can define various filesystem disks, specify their properties, and set the default filesystem disk to be used by the framework. Step 1: Default Filesystem Disk Step 2: Filesystem Disks &#8216;local&#8217; Disk &#8216;public&#8217; Disk &#8216;s3&#8217; Disk Step [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[63,11],"tags":[64,3,4],"_links":{"self":[{"href":"https:\/\/rishikantsri.in\/blog\/wp-json\/wp\/v2\/posts\/560"}],"collection":[{"href":"https:\/\/rishikantsri.in\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/rishikantsri.in\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/rishikantsri.in\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/rishikantsri.in\/blog\/wp-json\/wp\/v2\/comments?post=560"}],"version-history":[{"count":1,"href":"https:\/\/rishikantsri.in\/blog\/wp-json\/wp\/v2\/posts\/560\/revisions"}],"predecessor-version":[{"id":561,"href":"https:\/\/rishikantsri.in\/blog\/wp-json\/wp\/v2\/posts\/560\/revisions\/561"}],"wp:attachment":[{"href":"https:\/\/rishikantsri.in\/blog\/wp-json\/wp\/v2\/media?parent=560"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/rishikantsri.in\/blog\/wp-json\/wp\/v2\/categories?post=560"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/rishikantsri.in\/blog\/wp-json\/wp\/v2\/tags?post=560"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}