Skip to content

Commit

Permalink
rebuild docs
Browse files Browse the repository at this point in the history
  • Loading branch information
danharrin committed Nov 6, 2024
1 parent aa5babd commit e40e167
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 24 deletions.
19 changes: 1 addition & 18 deletions docs/dist/3.x/actions/installation/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -985,10 +985,6 @@ <h3 id="configuring-your-layout"><a class="heading-anchor" href="#configuring-yo
&lt;/body&gt;
&lt;/html&gt;
</textarea></code></pre>
<h2 id="deploying-to-production"><a class="heading-anchor" href="#deploying-to-production"><span class="heading-anchor-icon" aria-hidden="true">#</span></a>Deploying to production</h2>
<h3 id="using-a-production-ready-storage-disk"><a class="heading-anchor" href="#using-a-production-ready-storage-disk"><span class="heading-anchor-icon" aria-hidden="true">#</span></a>Using a production-ready storage disk</h3>
<p>Filament has a storage disk defined in the <a href="#publishing-configuration">configuration</a>, which by default is set to <code>public</code>. You can set the <code>FILAMENT_FILESYSTEM_DISK</code> environment variable to change this.</p>
<p>The <code>public</code> disk, while great for easy local development, is not suitable for production. It does not support file visibility, so features of Filament such as <a href="prebuilt-actions/export">exports</a> will create public files. In production, you need to use a production-ready disk such as <code>s3</code> with a private access policy, to prevent unauthorized access to the exported files.</p>
<h2 id="publishing-configuration"><a class="heading-anchor" href="#publishing-configuration"><span class="heading-anchor-icon" aria-hidden="true">#</span></a>Publishing configuration</h2>
<p>You can publish the package configuration using the following command (optional):</p>
<pre class="torchlight" style="background-color: #292D3E; --theme-selection-background: #00000080;" data-torchlight-processed="3449c9e5e332f1dbb81505cd739fbf3f"><code class="language-bash"><!-- Syntax highlighted by torchlight.dev --><div class='line'><span style="color: #FFCB6B;">php</span><span style="color: #A6ACCD;"> </span><span style="color: #C3E88D;">artisan</span><span style="color: #A6ACCD;"> </span><span style="color: #C3E88D;">vendor:publish</span><span style="color: #A6ACCD;"> </span><span style="color: #C3E88D;">--tag=filament-config</span></div><textarea data-torchlight-original="true" style="display: none !important;">php artisan vendor:publish --tag=filament-config
Expand Down Expand Up @@ -1029,7 +1025,7 @@ <h2 id="upgrading"><a class="heading-anchor" href="#upgrading"><span class="head
<nav aria-labelledby="on-this-page-title" class="my-6 w-56 astro-PTWJFCKA">
<h2 id="on-this-page-title" class="font-display text-sm font-bold text-stone-900 dark:text-white astro-PTWJFCKA">
On this page
</h2><ol role="list" class="mt-4 space-y-3 text-sm astro-PTWJFCKA" x-data="tableOfContents([{&#34;depth&#34;:2,&#34;slug&#34;:&#34;requirements&#34;,&#34;text&#34;:&#34;Requirements&#34;,&#34;title&#34;:&#34;Requirements&#34;,&#34;children&#34;:[]},{&#34;depth&#34;:2,&#34;slug&#34;:&#34;installation&#34;,&#34;text&#34;:&#34;Installation&#34;,&#34;title&#34;:&#34;Installation&#34;,&#34;children&#34;:[]},{&#34;depth&#34;:2,&#34;slug&#34;:&#34;new-laravel-projects&#34;,&#34;text&#34;:&#34;New Laravel projects&#34;,&#34;title&#34;:&#34;New Laravel projects&#34;,&#34;children&#34;:[]},{&#34;depth&#34;:2,&#34;slug&#34;:&#34;existing-laravel-projects&#34;,&#34;text&#34;:&#34;Existing Laravel projects&#34;,&#34;title&#34;:&#34;Existing Laravel projects&#34;,&#34;children&#34;:[{&#34;depth&#34;:3,&#34;slug&#34;:&#34;installing-tailwind-css&#34;,&#34;text&#34;:&#34;Installing Tailwind CSS&#34;,&#34;title&#34;:&#34;Installing Tailwind CSS&#34;},{&#34;depth&#34;:3,&#34;slug&#34;:&#34;configuring-styles&#34;,&#34;text&#34;:&#34;Configuring styles&#34;,&#34;title&#34;:&#34;Configuring styles&#34;},{&#34;depth&#34;:3,&#34;slug&#34;:&#34;automatically-refreshing-the-browser&#34;,&#34;text&#34;:&#34;Automatically refreshing the browser&#34;,&#34;title&#34;:&#34;Automatically refreshing the browser&#34;},{&#34;depth&#34;:3,&#34;slug&#34;:&#34;compiling-assets&#34;,&#34;text&#34;:&#34;Compiling assets&#34;,&#34;title&#34;:&#34;Compiling assets&#34;},{&#34;depth&#34;:3,&#34;slug&#34;:&#34;configuring-your-layout&#34;,&#34;text&#34;:&#34;Configuring your layout&#34;,&#34;title&#34;:&#34;Configuring your layout&#34;}]},{&#34;depth&#34;:2,&#34;slug&#34;:&#34;deploying-to-production&#34;,&#34;text&#34;:&#34;Deploying to production&#34;,&#34;title&#34;:&#34;Deploying to production&#34;,&#34;children&#34;:[{&#34;depth&#34;:3,&#34;slug&#34;:&#34;using-a-production-ready-storage-disk&#34;,&#34;text&#34;:&#34;Using a production-ready storage disk&#34;,&#34;title&#34;:&#34;Using a production-ready storage disk&#34;}]},{&#34;depth&#34;:2,&#34;slug&#34;:&#34;publishing-configuration&#34;,&#34;text&#34;:&#34;Publishing configuration&#34;,&#34;title&#34;:&#34;Publishing configuration&#34;,&#34;children&#34;:[]},{&#34;depth&#34;:2,&#34;slug&#34;:&#34;upgrading&#34;,&#34;text&#34;:&#34;Upgrading&#34;,&#34;title&#34;:&#34;Upgrading&#34;,&#34;children&#34;:[]}])" x-on:scroll.window="updateCurrentSection">
</h2><ol role="list" class="mt-4 space-y-3 text-sm astro-PTWJFCKA" x-data="tableOfContents([{&#34;depth&#34;:2,&#34;slug&#34;:&#34;requirements&#34;,&#34;text&#34;:&#34;Requirements&#34;,&#34;title&#34;:&#34;Requirements&#34;,&#34;children&#34;:[]},{&#34;depth&#34;:2,&#34;slug&#34;:&#34;installation&#34;,&#34;text&#34;:&#34;Installation&#34;,&#34;title&#34;:&#34;Installation&#34;,&#34;children&#34;:[]},{&#34;depth&#34;:2,&#34;slug&#34;:&#34;new-laravel-projects&#34;,&#34;text&#34;:&#34;New Laravel projects&#34;,&#34;title&#34;:&#34;New Laravel projects&#34;,&#34;children&#34;:[]},{&#34;depth&#34;:2,&#34;slug&#34;:&#34;existing-laravel-projects&#34;,&#34;text&#34;:&#34;Existing Laravel projects&#34;,&#34;title&#34;:&#34;Existing Laravel projects&#34;,&#34;children&#34;:[{&#34;depth&#34;:3,&#34;slug&#34;:&#34;installing-tailwind-css&#34;,&#34;text&#34;:&#34;Installing Tailwind CSS&#34;,&#34;title&#34;:&#34;Installing Tailwind CSS&#34;},{&#34;depth&#34;:3,&#34;slug&#34;:&#34;configuring-styles&#34;,&#34;text&#34;:&#34;Configuring styles&#34;,&#34;title&#34;:&#34;Configuring styles&#34;},{&#34;depth&#34;:3,&#34;slug&#34;:&#34;automatically-refreshing-the-browser&#34;,&#34;text&#34;:&#34;Automatically refreshing the browser&#34;,&#34;title&#34;:&#34;Automatically refreshing the browser&#34;},{&#34;depth&#34;:3,&#34;slug&#34;:&#34;compiling-assets&#34;,&#34;text&#34;:&#34;Compiling assets&#34;,&#34;title&#34;:&#34;Compiling assets&#34;},{&#34;depth&#34;:3,&#34;slug&#34;:&#34;configuring-your-layout&#34;,&#34;text&#34;:&#34;Configuring your layout&#34;,&#34;title&#34;:&#34;Configuring your layout&#34;}]},{&#34;depth&#34;:2,&#34;slug&#34;:&#34;publishing-configuration&#34;,&#34;text&#34;:&#34;Publishing configuration&#34;,&#34;title&#34;:&#34;Publishing configuration&#34;,&#34;children&#34;:[]},{&#34;depth&#34;:2,&#34;slug&#34;:&#34;upgrading&#34;,&#34;text&#34;:&#34;Upgrading&#34;,&#34;title&#34;:&#34;Upgrading&#34;,&#34;children&#34;:[]}])" x-on:scroll.window="updateCurrentSection">
<li class="astro-PTWJFCKA">
<h3 class="astro-PTWJFCKA">
<a href="#requirements" class="inline-block transition duration-300 ease-out astro-PTWJFCKA" x-bind:class="current == 'requirements' ? 'text-butter font-bold translate-x-1' : 'text-gray-500 hover:text-gray-700 dark:text-gray-300 dark:hover:text-gray-300 hover:translate-x-1'">
Expand Down Expand Up @@ -1080,19 +1076,6 @@ <h3 class="astro-PTWJFCKA">
</a>
</li>
</ol>
</li><li class="astro-PTWJFCKA">
<h3 class="astro-PTWJFCKA">
<a href="#deploying-to-production" class="inline-block transition duration-300 ease-out astro-PTWJFCKA" x-bind:class="current == 'deploying-to-production' ? 'text-butter font-bold translate-x-1' : 'text-gray-500 hover:text-gray-700 dark:text-gray-300 dark:hover:text-gray-300 hover:translate-x-1'">
Deploying to production
</a>
</h3>
<ol role="list" class="mt-2 space-y-3 pl-5 text-gray-500 dark:text-gray-300 astro-PTWJFCKA">
<li class="astro-PTWJFCKA">
<a href="#using-a-production-ready-storage-disk" class="inline-block transition duration-300 ease-out astro-PTWJFCKA" x-bind:class="current == 'using-a-production-ready-storage-disk' ? &#34;text-butter translate-x-1&#34; : &#34;hover:text-gray-600 dark:hover:text-white hover:translate-x-1&#34;">
Using a production-ready storage disk
</a>
</li>
</ol>
</li><li class="astro-PTWJFCKA">
<h3 class="astro-PTWJFCKA">
<a href="#publishing-configuration" class="inline-block transition duration-300 ease-out astro-PTWJFCKA" x-bind:class="current == 'publishing-configuration' ? 'text-butter font-bold translate-x-1' : 'text-gray-500 hover:text-gray-700 dark:text-gray-300 dark:hover:text-gray-300 hover:translate-x-1'">
Expand Down
7 changes: 3 additions & 4 deletions docs/dist/3.x/actions/prebuilt-actions/export/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -880,9 +880,6 @@ <h1 class="font-display text-3xl font-extrabold tracking-tight text-stone-900 da
</header>
<div class="prose prose-slate max-w-none dark:prose-invert dark:text-gray-300 prose-headings:scroll-mt-16 prose-headings:font-display prose-headings:font-bold prose-lead:text-gray-500 dark:prose-lead:text-gray-300 dark:prose-a:text-butter prose-a:no-underline prose-a:shadow-[inset_0_-2px_0_0_var(--tw-prose-background,#fff),inset_0_calc(-1*(var(--tw-prose-underline-size,4px)+2px))_0_0_var(--tw-prose-underline,theme(colors.peach-orange))] prose-a:transition hover:prose-a:[--tw-prose-underline-size:6px] dark:[--tw-prose-background:theme(colors.slate.900)] dark:prose-a:shadow-[inset_0_calc(-1*var(--tw-prose-underline-size,2px))_0_0_var(--tw-prose-underline,theme(colors.hurricane))] dark:hover:prose-a:[--tw-prose-underline-size:6px] prose-pre:rounded-xl prose-pre:bg-gray-900 prose-pre:shadow-lg dark:prose-pre:bg-gray-800/60 dark:prose-pre:shadow-none dark:prose-pre:ring-1 dark:prose-pre:ring-gray-300/10 prose-code:font-normal prose-code:before:hidden prose-code:after:hidden prose-blockquote:not-italic [&#38;_p]:before:hidden [&#38;_p]:after:hidden dark:prose-hr:border-gray-800">
<h2 id="overview"><a class="heading-anchor" href="#overview"><span class="heading-anchor-icon" aria-hidden="true">#</span></a>Overview</h2>
<blockquote>
<p>Please note that this feature uses the Filament filesystem to store exported files. The disk used by the Filament filesystem is defined in the <a href="../installation#publishing-configuration">configuration file</a>. By default, the disk is set to <code>public</code> for easy local development, so when using Filament exports in production, please make sure that you use a production-ready disk such as <code>s3</code> with a private access policy. You may also consider <a href="#customizing-the-storage-disk">customizing the storage disk</a> for exports only.</p>
</blockquote>
<p>Filament v3.2 introduced a prebuilt action that is able to export rows to a CSV or XLSX file. When the trigger button is clicked, a modal asks for the columns that they want to export, and what they should be labeled. This feature uses <a href="https://laravel.com/docs/queues#job-batching">job batches</a> and <a href="../../notifications/database-notifications#overview">database notifications</a>, so you need to publish those migrations from Laravel. Also, you need to publish the migrations for tables that Filament uses to store information about exports:</p>
<pre class="torchlight" style="background-color: #292D3E; --theme-selection-background: #00000080;" data-torchlight-processed="3449c9e5e332f1dbb81505cd739fbf3f"><code class="language-bash"><!-- Syntax highlighted by torchlight.dev --><div class='line'><span style="color: #676E95;"># Laravel 11 and higher</span></div><div class='line'><span style="color: #FFCB6B;">php</span><span style="color: #A6ACCD;"> </span><span style="color: #C3E88D;">artisan</span><span style="color: #A6ACCD;"> </span><span style="color: #C3E88D;">make:queue-batches-table</span></div><div class='line'><span style="color: #FFCB6B;">php</span><span style="color: #A6ACCD;"> </span><span style="color: #C3E88D;">artisan</span><span style="color: #A6ACCD;"> </span><span style="color: #C3E88D;">make:notifications-table</span></div><div class='line'>&nbsp;</div><div class='line'><span style="color: #676E95;"># Laravel 10</span></div><div class='line'><span style="color: #FFCB6B;">php</span><span style="color: #A6ACCD;"> </span><span style="color: #C3E88D;">artisan</span><span style="color: #A6ACCD;"> </span><span style="color: #C3E88D;">queue:batches-table</span></div><div class='line'><span style="color: #FFCB6B;">php</span><span style="color: #A6ACCD;"> </span><span style="color: #C3E88D;">artisan</span><span style="color: #A6ACCD;"> </span><span style="color: #C3E88D;">notifications:table</span></div><textarea data-torchlight-original="true" style="display: none !important;"># Laravel 11 and higher
php artisan make:queue-batches-table
Expand Down Expand Up @@ -1146,7 +1143,9 @@ <h2 id="modifying-the-export-query"><a class="heading-anchor" href="#modifying-t
</textarea></code></pre>
<h2 id="configuring-the-export-filesystem"><a class="heading-anchor" href="#configuring-the-export-filesystem"><span class="heading-anchor-icon" aria-hidden="true">#</span></a>Configuring the export filesystem</h2>
<h3 id="customizing-the-storage-disk"><a class="heading-anchor" href="#customizing-the-storage-disk"><span class="heading-anchor-icon" aria-hidden="true">#</span></a>Customizing the storage disk</h3>
<p>By default, exported files will be uploaded to the storage disk defined in the <a href="../installation#publishing-configuration">configuration file</a>, which is <code>public</code> by default. You can set the <code>FILAMENT_FILESYSTEM_DISK</code> environment variable to change this. In production, you need to use a production-ready disk such as <code>s3</code> with a private access policy, to prevent unauthorized access to the exported files.</p>
<p>By default, exported files will be uploaded to the storage disk defined in the <a href="../installation#publishing-configuration">configuration file</a>, which is <code>public</code> by default. You can set the <code>FILAMENT_FILESYSTEM_DISK</code> environment variable to change this.</p>
<p>While using the <code>public</code> disk a good default for many parts of Filament, using it for exports would result in exported files being stored in a public location. As such, if the default filesystem disk is <code>public</code> and a <code>local</code> disk exists in your <code>config/filesystems.php</code>, Filament will use the <code>local</code> disk for exports instead. If you override the disk to be <code>public</code> for an <code>ExportAction</code> or inside an exporter class, Filament will use that.</p>
<p>In production, you should use a disk such as <code>s3</code> with a private access policy, to prevent unauthorized access to the exported files.</p>
<p>If you want to use a different disk for a specific export, you can pass the disk name to the <code>disk()</code> method on the action:</p>
<pre class="torchlight" style="background-color: #292D3E; --theme-selection-background: #00000080;" data-torchlight-processed="3449c9e5e332f1dbb81505cd739fbf3f"><code class="language-php"><!-- Syntax highlighted by torchlight.dev --><div class='line'><span style="color: #FFCB6B;">ExportAction</span><span style="color: #89DDFF;">::</span><span style="color: #82AAFF;">make</span><span style="color: #89DDFF;">()</span></div><div class='line'><span style="color: #A6ACCD;"> </span><span style="color: #89DDFF;">-&gt;</span><span style="color: #82AAFF;">exporter</span><span style="color: #89DDFF;">(</span><span style="color: #FFCB6B;">ProductExporter</span><span style="color: #89DDFF;">::</span><span style="color: #F78C6C;">class</span><span style="color: #89DDFF;">)</span></div><div class='line'><span style="color: #A6ACCD;"> </span><span style="color: #89DDFF;">-&gt;</span><span style="color: #82AAFF;">fileDisk</span><span style="color: #89DDFF;">(</span><span style="color: #89DDFF;">&#39;</span><span style="color: #C3E88D;">s3</span><span style="color: #89DDFF;">&#39;</span><span style="color: #89DDFF;">)</span></div><textarea data-torchlight-original="true" style="display: none !important;">ExportAction::make()
-&gt;exporter(ProductExporter::class)
Expand Down
2 changes: 1 addition & 1 deletion docs/dist/3.x/panels/installation/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -1058,7 +1058,7 @@ <h3 id="allowing-users-to-access-a-panel"><a class="heading-anchor" href="#allow
<p>Learn more about <a href="users">users</a>.</p>
<h3 id="using-a-production-ready-storage-disk"><a class="heading-anchor" href="#using-a-production-ready-storage-disk"><span class="heading-anchor-icon" aria-hidden="true">#</span></a>Using a production-ready storage disk</h3>
<p>Filament has a storage disk defined in the <a href="#publishing-configuration">configuration</a>, which by default is set to <code>public</code>. You can set the <code>FILAMENT_FILESYSTEM_DISK</code> environment variable to change this.</p>
<p>The <code>public</code> disk, while great for easy local development, is not suitable for production. It does not support file visibility, so features of Filament such as <a href="../actions/prebuilt-actions/export">exports</a> will create public files. In production, you need to use a production-ready disk such as <code>s3</code> with a private access policy, to prevent unauthorized access to the exported files.</p>
<p>The <code>public</code> disk, while great for easy local development, is not suitable for production. It does not support file visibility, so features of Filament such as <a href="../forms/fields/file-upload">file uploads</a> will create public files. In production, you need to use a production-ready disk such as <code>s3</code> with a private access policy, to prevent unauthorized access to the uploaded files.</p>
<h2 id="publishing-configuration"><a class="heading-anchor" href="#publishing-configuration"><span class="heading-anchor-icon" aria-hidden="true">#</span></a>Publishing configuration</h2>
<p>You can publish the Filament package configuration (if needed) using the following command:</p>
<pre class="torchlight" style="background-color: #292D3E; --theme-selection-background: #00000080;" data-torchlight-processed="3449c9e5e332f1dbb81505cd739fbf3f"><code class="language-bash"><!-- Syntax highlighted by torchlight.dev --><div class='line'><span style="color: #FFCB6B;">php</span><span style="color: #A6ACCD;"> </span><span style="color: #C3E88D;">artisan</span><span style="color: #A6ACCD;"> </span><span style="color: #C3E88D;">vendor:publish</span><span style="color: #A6ACCD;"> </span><span style="color: #C3E88D;">--tag=filament-config</span></div><textarea data-torchlight-original="true" style="display: none !important;">php artisan vendor:publish --tag=filament-config
Expand Down
Loading

0 comments on commit e40e167

Please sign in to comment.