<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Filament Mastery</title>
    <description>The latest articles on DEV Community by Filament Mastery (@filamentmastery).</description>
    <link>https://dev.to/filamentmastery</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Forganization%2Fprofile_image%2F10797%2F2a705c08-4c93-4d51-8e2c-a0058af4afa9.png</url>
      <title>DEV Community: Filament Mastery</title>
      <link>https://dev.to/filamentmastery</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/filamentmastery"/>
    <language>en</language>
    <item>
      <title>Filament slow on large table? Optimize with Postgres partitions</title>
      <dc:creator>yebor974</dc:creator>
      <pubDate>Tue, 13 Jan 2026 07:20:56 +0000</pubDate>
      <link>https://dev.to/filamentmastery/filament-slow-on-large-table-optimize-with-postgres-partitions-52l2</link>
      <guid>https://dev.to/filamentmastery/filament-slow-on-large-table-optimize-with-postgres-partitions-52l2</guid>
      <description>&lt;p&gt;When I started working on a client project, I ran into a familiar challenge: a Filament Resource managing millions of sensor measurements.&lt;br&gt;&lt;br&gt;
The table contained several years of historical data. Most users usually focused on the current month, but occasionally they needed to look back at older measurements for special cases.&lt;br&gt;&lt;br&gt;
At first, it looked like the resource was slow simply due to its sheer size, but profiling revealed a deeper issue. It became clear that Filament itself was not the bottleneck, the database was.&lt;/p&gt;
&lt;h2&gt;
  
  
  Identifying the problem
&lt;/h2&gt;

&lt;p&gt;Filtering by date or sensor type took several seconds, even for just the current month. Sorting and pagination felt sluggish. It was a classic case of “everything works, but not fast enough for production.”&lt;br&gt;&lt;br&gt;
The goal was simple: allow fast access to current data while keeping historical queries possible, without rewriting the panel.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;The example below has been simplified for clarity. In the real project, additional filters and performance optimizations were applied. Default dates focus on the current month, but older data queries remain fully supported. The project was built with FilamentPHP and PostgreSQL.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;
  
  
  Partitioning the table by month
&lt;/h2&gt;

&lt;p&gt;To solve the problem, I used PostgreSQL table partitioning, splitting the data by month. Here’s a simplified example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// Parent table
CREATE TABLE sensor_measurements (
    id BIGSERIAL NOT NULL,
    sensor_id BIGINT NOT NULL REFERENCES sensors(id) ON DELETE CASCADE,
    value NUMERIC(10,2) NOT NULL,
    measured_at TIMESTAMP(0) NOT NULL,
      data JSONB
      created_at TIMESTAMP(0) DEFAULT now(),
    updated_at TIMESTAMP(0) DEFAULT now(),
      PRIMARY KEY (id, measured_at)
) PARTITION BY RANGE (measured_at);

// a month partition
CREATE TABLE IF NOT EXISTS sensor_measurements_2026_01 PARTITION OF sensor_measurements
    FOR VALUES FROM ('2026-01-01') TO ('2026-02-01');

CREATE TABLE IF NOT EXISTS sensor_measurements_2026_02 PARTITION OF sensor_measurements
    FOR VALUES FROM ('2026-02-01') TO ('2026-03-01');

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;The partition key need to be in the primary key.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Partitioning ensures queries for the current month only scan a small, relevant subset, keeping performance high. Historical queries still work efficiently by targeting older partitions.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;I created a scheduled job to automatically create new year/month partitions. More information about PostgreSQL partitioning is available in the &lt;a href="https://www.postgresql.org/docs/current/ddl-partitioning.html" rel="noopener noreferrer"&gt;official PostgreSQL documentation&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Adding indexes and optimizing queries
&lt;/h2&gt;

&lt;p&gt;Indexes must be created on each partition, not on the parent table. For example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;CREATE INDEX idx_sensor_measurements_2026_01_data_gin
    ON sensor_measurements_2026_01(sensor_id)
      USING GIN (data);

CREATE INDEX idx_sensor_measurements_2026_01_measured_at 
    ON sensor_measurements_2026_02(measured_at)
      USING GIN (data);

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This ensures that even with filters, the database can quickly find the relevant rows.&lt;/p&gt;

&lt;h2&gt;
  
  
  Adjusting the Filament Resource
&lt;/h2&gt;

&lt;p&gt;Finally, I adapted the Filament Resource with default filters for the current month:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;use Carbon\Carbon;

class SensorMeasurementResource extends Resource
{
      //...

    public static function table(Table $table): Table
    {
        $now = Carbon::now();

        return $table
            -&amp;gt;columns([
                TextColumn::make('sensor_id')-&amp;gt;sortable(),
                TextColumn::make('value'),
                TextColumn::make('measured_at')-&amp;gt;dateTime(),
            ])
            -&amp;gt;filters([
                Filter::make('date')
                    -&amp;gt;form([
                        DatePicker::make('from')
                            -&amp;gt;default($now-&amp;gt;copy()-&amp;gt;startOfMonth()),
                        DatePicker::make('to')
                            -&amp;gt;default($now-&amp;gt;copy()-&amp;gt;endOfMonth()),
                    ])
                    -&amp;gt;query(fn(Builder $query, array $data) =&amp;gt; $query
                        -&amp;gt;when($data['from'], fn($q) =&amp;gt; $q-&amp;gt;where('measured_at', '&amp;gt;=', $data['from']))
                        -&amp;gt;when($data['to'], fn($q) =&amp;gt; $q-&amp;gt;where('measured_at', '&amp;lt;=', $data['to']))
                    ),
            ]);
    }
}

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;I didn't include the TableSchema file in this example for simplicity. One limitation is that the filter cannot be made mandatory without allowing users to remove it from the indicators toolbar. The goal is to always have a date range to optimize database loading.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Results
&lt;/h2&gt;

&lt;p&gt;The impact was immediate:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Queries for the current month now return in under 300ms&lt;/li&gt;
&lt;li&gt;Historical queries remain fast enough for occasional analysis&lt;/li&gt;
&lt;li&gt;Users can explore both current and past data without frustration&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Lessons Learned
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;Filament can handle large datasets, if the underlying database is optimized.&lt;/li&gt;
&lt;li&gt;Partitioning by time periods is ideal for sensor or historical measurement data.&lt;/li&gt;
&lt;li&gt;Proper indexes + pagination make huge tables usable in production.&lt;/li&gt;
&lt;li&gt;Profiling queries first saves hours of wasted debugging in the admin panel.&lt;/li&gt;
&lt;li&gt;Small tweaks in Filament (filters, lazy-loading) can dramatically improve UX.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;If you enjoyed this kind of real-world experience and case study, don’t forget to like and share it!&lt;/p&gt;

&lt;p&gt;📬 &lt;a href="https://filamentmastery.com" rel="noopener noreferrer"&gt;Join the community on filamentmastery.com&lt;/a&gt;&lt;/p&gt;

</description>
      <category>filament</category>
      <category>laravel</category>
      <category>php</category>
      <category>postgres</category>
    </item>
    <item>
      <title>One year of Filament Mastery - A personal look back at 2025</title>
      <dc:creator>yebor974</dc:creator>
      <pubDate>Wed, 31 Dec 2025 08:13:03 +0000</pubDate>
      <link>https://dev.to/filamentmastery/one-year-of-filament-mastery-a-personal-look-back-at-2025-1ek1</link>
      <guid>https://dev.to/filamentmastery/one-year-of-filament-mastery-a-personal-look-back-at-2025-1ek1</guid>
      <description>&lt;p&gt;About a year ago, I launched &lt;a href="https://filamentmastery.com" rel="noopener noreferrer"&gt;Filament Mastery&lt;/a&gt; with a pretty simple goal: create a place around FilamentPHP that I would genuinely enjoy reading myself.&lt;/p&gt;

&lt;p&gt;No hype, no endless tutorials rewritten ten times, no over-engineered examples, just clear, useful content for developers building things with Filament.&lt;/p&gt;

&lt;p&gt;As 2025 comes to an end, this felt like the right moment to pause for a bit and look back at what Filament Mastery has become over its first year.&lt;/p&gt;

&lt;h2&gt;
  
  
  Filament Mastery in numbers
&lt;/h2&gt;

&lt;p&gt;I usually don’t obsess too much over metrics, but numbers can still tell part of the story.&lt;/p&gt;

&lt;p&gt;After one year, Filament Mastery looks like this:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;347 community members&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;274 newsletter subscribers&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;35 published articles&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;12 community links&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;4 partners supporting the project&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;They’re just numbers, but behind them are real people reading, learning, experimenting, and building things with Filament.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ff4gev7bl6lggr476j2uc.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ff4gev7bl6lggr476j2uc.png" alt="Filament Mastery Dashboard 2025" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  A community that goes beyond borders
&lt;/h2&gt;

&lt;p&gt;One thing that surprised me early on was how international the audience became.&lt;/p&gt;

&lt;p&gt;Looking at the dashboard, users are spread across many different time zones. Some of that data isn’t perfectly accurate (a lot of users are still grouped under UTC), but the overall trend is clear:&lt;br&gt;&lt;br&gt;
Filament Mastery is being read all over the world.&lt;/p&gt;

&lt;p&gt;Different countries, different projects, different levels of experience — but the same interest in building solid back-offices with Filament.&lt;/p&gt;

&lt;h2&gt;
  
  
  What this year taught me
&lt;/h2&gt;

&lt;p&gt;Working on Filament Mastery over the past year reinforced a few things I already suspected:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Developers value clarity more than complexity.&lt;/li&gt;
&lt;li&gt;Not every problem needs a clever abstraction or a custom solution.&lt;/li&gt;
&lt;li&gt;Filament works best when you lean into its conventions instead of fighting them.&lt;/li&gt;
&lt;li&gt;Writing content that &lt;em&gt;you&lt;/em&gt; would actually use is usually the right approach.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I intentionally kept Filament Mastery focused and calm. No rush to publish, no pressure to cover everything, just content that feels useful and honest.&lt;/p&gt;

&lt;h2&gt;
  
  
  A sincere thank you
&lt;/h2&gt;

&lt;p&gt;Even though I’m writing this from a personal perspective, Filament Mastery wouldn’t exist without the people reading it and writing.&lt;/p&gt;

&lt;p&gt;So thank you, whether you’ve read one article, subscribed to the newsletter, shared a link, wrote an article or simply bookmarked the site and come back from time to time.&lt;/p&gt;

&lt;h2&gt;
  
  
  Where to follow Filament Mastery
&lt;/h2&gt;

&lt;p&gt;If you’d like to stay updated, share content, or help the community grow, you can also find Filament Mastery on:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;&lt;a href="https://x.com/FilamentMastery" rel="noopener noreferrer"&gt;X.com&lt;/a&gt;&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;a href="https://dev.to/filamentmastery"&gt;Dev.to&lt;/a&gt;&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;a href="https://www.facebook.com/profile.php?id=61569380882543" rel="noopener noreferrer"&gt;Facebook&lt;/a&gt;&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;a href="https://www.linkedin.com/company/filament-mastery" rel="noopener noreferrer"&gt;LinkedIn&lt;/a&gt;&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Following and sharing helps more than you might think.&lt;/p&gt;

&lt;h2&gt;
  
  
  Looking ahead to 2026
&lt;/h2&gt;

&lt;p&gt;I don’t have a big roadmap or ambitious promises for 2026 — and that’s very much on purpose.&lt;/p&gt;

&lt;p&gt;Most of what I share on Filament Mastery comes directly from real client projects.&lt;br&gt;&lt;br&gt;
Things I actually use, patterns that work in practice, and decisions made under real-world constraints. I usually avoid diving too deep into heavy concepts like strict DDD or over-abstracted architectures, not because they’re wrong, but because they often add complexity and make articles harder to read and reuse.&lt;/p&gt;

&lt;p&gt;My goal is to keep sharing practical ideas that you can adapt easily, without forcing a specific methodology or way of thinking.&lt;/p&gt;

&lt;p&gt;I also want Filament Mastery to stay open and community-driven.&lt;br&gt;&lt;br&gt;
Anyone can write and publish content directly from their member area, and this will remain &lt;strong&gt;free&lt;/strong&gt;. No paywalls, no hidden requirements, just useful content shared by people building real things.&lt;/p&gt;

&lt;p&gt;On a more personal note, 2026 will also be a bit different for me. I’m planning to spend around six months in Europe, and if the opportunity comes up, I’ll try to attend local meetups or events. Nothing official or planned yet, just a chance to meet people from the community in real life.&lt;/p&gt;

&lt;p&gt;For now, the direction stays simple: build, learn, share and keep things approachable.&lt;/p&gt;

&lt;p&gt;Thanks for being part of this first year, and see you in 2026 🚀&lt;/p&gt;

&lt;p&gt;📬 &lt;a href="https://filamentmastery.com" rel="noopener noreferrer"&gt;Join the community on filamentmastery.com&lt;/a&gt;&lt;/p&gt;

</description>
      <category>filament</category>
      <category>laravel</category>
      <category>php</category>
      <category>webdev</category>
    </item>
    <item>
      <title>How to send Filament database notifications to a specific queue</title>
      <dc:creator>yebor974</dc:creator>
      <pubDate>Thu, 04 Sep 2025 10:10:16 +0000</pubDate>
      <link>https://dev.to/filamentmastery/how-to-send-filament-database-notifications-to-a-specific-queue-1e91</link>
      <guid>https://dev.to/filamentmastery/how-to-send-filament-database-notifications-to-a-specific-queue-1e91</guid>
      <description>&lt;p&gt;When working with &lt;code&gt;Filament\Notifications\Notification&lt;/code&gt;, sending database notifications with &lt;code&gt;sendToDatabase()&lt;/code&gt; is super convenient. But what if you want to control which queue these notifications are dispatched to?&lt;/p&gt;

&lt;p&gt;At first glance, this looks tricky, Filament doesn’t expose a queue configuration option directly. But the good news is: you can still take full advantage of Laravel’s queue system.&lt;/p&gt;

&lt;h2&gt;
  
  
  Default behavior for Filament notifications on database
&lt;/h2&gt;

&lt;p&gt;The usual Filament way looks like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;use Filament\Notifications\Notification;

Notification::make()
    -&amp;gt;title("Your request has been processed")
    -&amp;gt;body("Some details about the request")
    -&amp;gt;sendToDatabase($user);

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;What happens under the hood:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Filament calls &lt;code&gt;$user-&amp;gt;notify($this-&amp;gt;toDatabase())&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;toDatabase()&lt;/code&gt; creates a &lt;code&gt;Filament\Notifications\DatabaseNotification&lt;/code&gt;, which extends Laravel’s &lt;code&gt;Notification&lt;/code&gt;, implements &lt;code&gt;ShouldQueue&lt;/code&gt;, and uses the &lt;code&gt;Queueable&lt;/code&gt; trait.&lt;/li&gt;
&lt;li&gt;That means the notification goes into the queue defined by your &lt;code&gt;QUEUE_CONNECTION&lt;/code&gt; (&lt;code&gt;database&lt;/code&gt;, &lt;code&gt;redis&lt;/code&gt;, etc.), but you &lt;strong&gt;cannot specify which queue name&lt;/strong&gt; this way.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  How to control the queue: Using &lt;code&gt;toDatabase()&lt;/code&gt; + &lt;code&gt;onQueue()&lt;/code&gt;
&lt;/h2&gt;

&lt;p&gt;Instead of &lt;code&gt;sendToDatabase()&lt;/code&gt;, grab the notification instance with &lt;code&gt;toDatabase()&lt;/code&gt; and apply &lt;code&gt;onQueue()&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;use Filament\Notifications\Notification as FilamentNotification;

$databaseNotification = FilamentNotification::make()
    -&amp;gt;title("Your request has been processed")
    -&amp;gt;body("Some details about the request")
    -&amp;gt;toDatabase() // returns a DatabaseNotification (Laravel Notification)
    -&amp;gt;onQueue('notifications'); // from Queueable trait

$user-&amp;gt;notify($databaseNotification);

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Or, in a single line:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$user-&amp;gt;notify(
    FilamentNotification::make()
        -&amp;gt;title("Your request has been processed")
        -&amp;gt;body("Some details about the request")
        -&amp;gt;toDatabase()
        -&amp;gt;onQueue('notifications')
);

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This way you keep the simplicity of Filament’s fluent API &lt;strong&gt;and&lt;/strong&gt; you get fine-grained queue control.&lt;/p&gt;

&lt;h2&gt;
  
  
  Multiple users example
&lt;/h2&gt;

&lt;p&gt;If you need to notify multiple users on the same queue:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$notif = FilamentNotification::make()
    -&amp;gt;title("Your request has been processed")
    -&amp;gt;body("Some details about the request")
    -&amp;gt;toDatabase()
    -&amp;gt;onQueue('notifications');

foreach ($users as $user) {
    $user-&amp;gt;notify($notif); // reuses the same notification instance
}

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;If you just want to send database notifications, Filament’s &lt;code&gt;sendToDatabase()&lt;/code&gt; is perfect.&lt;/p&gt;

&lt;p&gt;But if you need &lt;strong&gt;queue control&lt;/strong&gt; , switch to &lt;code&gt;toDatabase()-&amp;gt;onQueue('...')&lt;/code&gt;. That way you stay fully in the Filament ecosystem, so your notifications are correctly stored and displayed in your Filament panels, while still taking advantage of Laravel’s queue flexibility.&lt;/p&gt;

&lt;p&gt;🙏 Thanks to &lt;a href="https://github.com/obaume" rel="noopener noreferrer"&gt;@obaume&lt;/a&gt; for reaching out on this topic. His question made me dive deeper into Filament notifications and discover this approach!&lt;/p&gt;

&lt;p&gt;💡 Community Idea: Currently, &lt;code&gt;sendToDatabase()&lt;/code&gt; doesn’t allow specifying a queue. If this article gets enough likes or shares, I’ll consider proposing a Pull Request to Filament to add this feature—making queue management even easier for everyone!&lt;/p&gt;

&lt;p&gt;📬 &lt;a href="https://filamentmastery.com" rel="noopener noreferrer"&gt;Join the community on filamentmastery.com&lt;/a&gt; — it's free!&lt;/p&gt;

</description>
      <category>filament</category>
      <category>laravel</category>
      <category>php</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Filament Email Verification: Leveraging Laravel’s Event System</title>
      <dc:creator>yebor974</dc:creator>
      <pubDate>Wed, 20 Aug 2025 04:11:50 +0000</pubDate>
      <link>https://dev.to/filamentmastery/filament-email-verification-leveraging-laravels-event-system-2dmm</link>
      <guid>https://dev.to/filamentmastery/filament-email-verification-leveraging-laravels-event-system-2dmm</guid>
      <description>&lt;p&gt;In this tutorial, we'll explore how to trigger an event when a user's email is verified in a Filament application. While this is primarily a Laravel concept, Filament fully supports and integrates with Laravel's powerful event and listener system. You'll see how to apply this to Filament projects seamlessly.&lt;/p&gt;

&lt;p&gt;We’ll cover:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Creating a listener for the email verification event,&lt;/li&gt;
&lt;li&gt;Triggering actions such as Stripe registration or newsletter subscription,&lt;/li&gt;
&lt;li&gt;Testing the event with &lt;code&gt;Event::fake&lt;/code&gt;,&lt;/li&gt;
&lt;li&gt;Extending the logic to other events like user registration or login.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;By the end, you'll understand how to leverage Laravel's event system in your FilamentPHP apps for advanced user workflows.&lt;/p&gt;

&lt;p&gt;To set up your project for enabling email verification on panel, you can check the first step of &lt;a href="https://filamentmastery.com/articles/email-verification-in-filament-userresource-filters-and-actions" rel="noopener noreferrer"&gt;this article&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 1: Create a Listener for the &lt;code&gt;Verified&lt;/code&gt; Event
&lt;/h2&gt;

&lt;p&gt;Laravel emits the &lt;strong&gt;&lt;code&gt;Illuminate\Auth\Events\Verified&lt;/code&gt;&lt;/strong&gt; event when a user successfully verifies their email. Here's how to hook into it.&lt;/p&gt;

&lt;h3&gt;
  
  
  1.1 Generate the Listener
&lt;/h3&gt;

&lt;p&gt;Run the following command to create a new listener:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;php artisan make:listener HandleUserEmailVerified

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This command will create a file in &lt;code&gt;App\Listeners&lt;/code&gt; folder:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;namespace App\Listeners;

use Illuminate\Auth\Events\Verified;

class HandleUserEmailVerified
{
    /**
     * Handle the event.
     *
     * @param \Illuminate\Auth\Events\Verified $event
     * @return void
     */
    public function handle(Verified $event)
    {
        ///
    }
}

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  1.2 Implement the Listener
&lt;/h3&gt;

&lt;p&gt;Update the listener to perform actions after email verification, for example :&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;namespace App\Listeners;

use Illuminate\Auth\Events\Verified;

class HandleUserEmailVerified
{
    /**
     * Handle the event.
     *
     * @param \Illuminate\Auth\Events\Verified $event
     * @return void
     */
    public function handle(Verified $event)
    {
        $user = $event-&amp;gt;user;

        // Example: Create a Stripe account
        if (!$user-&amp;gt;stripe_id) {
            $this-&amp;gt;createStripeAccount($user);
        }

        // Example: Subscribe to a newsletter
        $this-&amp;gt;subscribeToNewsletter($user);
    }

    protected function createStripeAccount($user)
    {
        // Logic to integrate with Stripe API
    }

    protected function subscribeToNewsletter($user)
    {
        // Logic to integrate with a mailing list API
    }
}

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Step 2: Register the Listener for the &lt;code&gt;Verified&lt;/code&gt; Event
&lt;/h2&gt;

&lt;p&gt;If you're using Laravel 10 or later, Laravel can auto-discover event-listener mappings. So this step may not always be required, but keeping it explicit helps with debugging.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;namespace App\Providers;

use Illuminate\Auth\Events\Verified;
use App\Listeners\HandleUserEmailVerified;

class EventServiceProvider extends ServiceProvider
{
    protected $listen = [
        Verified::class =&amp;gt; [
            HandleUserEmailVerified::class,
        ],
    ];
}

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Step 3: Test the Listener with &lt;code&gt;Event::fake&lt;/code&gt;
&lt;/h2&gt;

&lt;p&gt;Before using this in production, ensure everything works as expected. Laravel provides a helpful testing utility to fake events and assert their behavior.&lt;/p&gt;

&lt;p&gt;Here’s a test example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;namespace Tests\Feature;

use Illuminate\Auth\Events\Verified;
use Illuminate\Foundation\Testing\RefreshDatabase;
use Illuminate\Support\Facades\Event;
use Tests\TestCase;
use App\Models\User;

class EmailVerificationTest extends TestCase
{
    use RefreshDatabase;

    /** @test */
    public function it_dispatches_verified_event_after_email_verification()
    {
        Event::fake();

        $user = User::factory()-&amp;gt;unverified()-&amp;gt;create();

        $user-&amp;gt;markEmailAsVerified();

        // Assert the Verified event was dispatched
        Event::assertDispatched(Verified::class, function ($event) use ($user) {
            return $event-&amp;gt;user-&amp;gt;is($user);
        });
    }
}

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Step 4: Applying the concept in FilamentPHP
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Why This Matters in Filament
&lt;/h3&gt;

&lt;p&gt;Filament is built on Laravel, meaning you can use Laravel's event system in your Filament-powered applications. For example, when managing a &lt;strong&gt;User Resource&lt;/strong&gt; , you can leverage the same listener to perform actions after email verification.&lt;/p&gt;

&lt;p&gt;You could:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Add custom hooks in Filament tables or forms,&lt;/li&gt;
&lt;li&gt;Use Filament notifications to display messages when an event is triggered,&lt;/li&gt;
&lt;li&gt;Extend user workflows directly within the Filament admin panel.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Step 5: Extending the Principle
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Event: &lt;code&gt;Registered&lt;/code&gt;
&lt;/h3&gt;

&lt;p&gt;The &lt;strong&gt;&lt;code&gt;Illuminate\Auth\Events\Registered&lt;/code&gt;&lt;/strong&gt; event fires after a new user is created. This is useful for:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Sending a welcome email,&lt;/li&gt;
&lt;li&gt;Assigning default roles,&lt;/li&gt;
&lt;li&gt;Creating a related profile or team entry.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Example listener:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;namespace App\Listeners;

use Illuminate\Auth\Events\Registered;

class HandleUserRegistered
{
    public function handle(Registered $event)
    {
        $user = $event-&amp;gt;user;

        // Assign a default role
        $user-&amp;gt;assignRole('default');
    }
}

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Event: &lt;code&gt;Login&lt;/code&gt;
&lt;/h3&gt;

&lt;p&gt;The &lt;strong&gt;&lt;code&gt;Illuminate\Auth\Events\Login&lt;/code&gt;&lt;/strong&gt; event fires upon user login. Use it to:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Log user activity,&lt;/li&gt;
&lt;li&gt;Update a "last login" timestamp,&lt;/li&gt;
&lt;li&gt;Sync data with an external system.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Example listener:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;namespace App\Listeners;

use Illuminate\Auth\Events\Login;

class HandleUserLogin
{
    public function handle(Login $event)
    {
        $user = $event-&amp;gt;user;

        // Update last login time
        $user-&amp;gt;update(['last_login_at' =&amp;gt; now()]);
    }
}

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;By using Laravel's event system into your Filament projects, you can create robust workflows tailored to user actions. Whether it's email verification, registration, or login, the possibilities are endless.&lt;/p&gt;

&lt;p&gt;📬 &lt;a href="https://filamentmastery.com/member/register" rel="noopener noreferrer"&gt;Join the community on filamentmastery.com&lt;/a&gt; — it's free!&lt;/p&gt;

</description>
      <category>filament</category>
      <category>laravel</category>
      <category>php</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Laravel Filament Multipanel Starter - Build your app fast</title>
      <dc:creator>yebor974</dc:creator>
      <pubDate>Wed, 13 Aug 2025 11:20:37 +0000</pubDate>
      <link>https://dev.to/filamentmastery/laravel-filament-multipanel-starter-build-your-app-fast-9i3</link>
      <guid>https://dev.to/filamentmastery/laravel-filament-multipanel-starter-build-your-app-fast-9i3</guid>
      <description>&lt;p&gt;Looking for a &lt;strong&gt;ready-to-use admin and member panels&lt;/strong&gt; for your Laravel projects? Meet &lt;strong&gt;Laravel Filament Multipanel Starter&lt;/strong&gt; — a clean, opinionated starter kit designed to help you &lt;strong&gt;ship faster&lt;/strong&gt; with &lt;strong&gt;Laravel 12&lt;/strong&gt; and &lt;strong&gt;Filament PHP v4&lt;/strong&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  What’s included?
&lt;/h2&gt;

&lt;p&gt;Setting up a secure and well-structured backend can take hours. With this starter, you get:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Dedicated &lt;strong&gt;admin panel&lt;/strong&gt; accessible via path or subdomain&lt;/li&gt;
&lt;li&gt;Dedicated &lt;strong&gt;member panel&lt;/strong&gt; accessible via path or subdomain&lt;/li&gt;
&lt;li&gt;Secure authentication with:

&lt;ul&gt;
&lt;li&gt;Email invitation system on user creation&lt;/li&gt;
&lt;li&gt;Password renewal required on first login (via &lt;a href="https://github.com/yebor974/filament-renew-password" rel="noopener noreferrer"&gt;Filament Renew Password&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;Multi-factor authentication with App authentication (not required)&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;User management (Filament Resource) with:

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://github.com/spatie/laravel-permission" rel="noopener noreferrer"&gt;Spatie Laravel Permission&lt;/a&gt; for roles &amp;amp; permissions&lt;/li&gt;
&lt;li&gt;Default roles and policies pre-seeded&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;User profile management (email, name, password, timezone)&lt;/li&gt;

&lt;li&gt;Light &amp;amp; Dark theme switch + empty custom theme ready to be extended&lt;/li&gt;

&lt;li&gt;Database notifications (Filament native support)&lt;/li&gt;

&lt;li&gt;

&lt;a href="https://github.com/opcodesio/log-viewer" rel="noopener noreferrer"&gt;Logs Viewer&lt;/a&gt; integration (&lt;code&gt;opcodesio/log-viewer&lt;/code&gt;) — protected by auth &amp;amp; backend role&lt;/li&gt;

&lt;li&gt;

&lt;a href="https://laravel.com/docs/horizon" rel="noopener noreferrer"&gt;Laravel Horizon&lt;/a&gt; — queued jobs management — protected by auth and backend role&lt;/li&gt;

&lt;li&gt;Timezone management from user profile - Custom registration for member panel with timezone auto-detect.&lt;/li&gt;

&lt;li&gt;Centralized date display settings (&lt;code&gt;TextColumn&lt;/code&gt;, &lt;code&gt;DateTimePicker&lt;/code&gt;)&lt;/li&gt;

&lt;li&gt;Default password policy (min 12 characters, mixed case, numbers, symbols)&lt;/li&gt;

&lt;li&gt;Fully &lt;strong&gt;localized&lt;/strong&gt; , default to 🇬🇧 english. Extends with your own languages&lt;/li&gt;

&lt;li&gt;Dev-friendly tools:

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://github.com/barryvdh/laravel-debugbar" rel="noopener noreferrer"&gt;Laravel Debugbar&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://phpstan.org/" rel="noopener noreferrer"&gt;PHPStan&lt;/a&gt; for static analysis&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://laravel.com/docs/pint" rel="noopener noreferrer"&gt;Pint&lt;/a&gt; for consistent code formatting&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;

&lt;p&gt;Instead of reinventing the wheel every time you need a &lt;strong&gt;secure backend panel&lt;/strong&gt; and a &lt;strong&gt;secure member panel&lt;/strong&gt; , this template gives you a &lt;strong&gt;solid, scalable foundation&lt;/strong&gt; —with the best practices already in place.&lt;/p&gt;

&lt;h2&gt;
  
  
  Tech stack highlights
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Laravel 12&lt;/li&gt;
&lt;li&gt;Filament PHP v4&lt;/li&gt;
&lt;li&gt;Tailwind CSS v4&lt;/li&gt;
&lt;li&gt;PHP 8.2+&lt;/li&gt;
&lt;li&gt;PostgreSQL / MySQL&lt;/li&gt;
&lt;li&gt;Redis &amp;amp; Laravel Horizon&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Who is it for?
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;✅ SaaS admin and member panels&lt;/li&gt;
&lt;li&gt;✅ Internal dashboards&lt;/li&gt;
&lt;li&gt;✅ Intended for public-facing user portals (for a simple backend panel without member panel you can see &lt;a href="https://filamentmastery.com/articles/laravel-filament-backend-starter-build-your-admin-panel-fast" rel="noopener noreferrer"&gt;Laravel Filament Backend Starter&lt;/a&gt;).&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Compare Starter Templates
&lt;/h3&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Feature / Module&lt;/th&gt;
&lt;th&gt;&lt;strong&gt;&lt;a href="https://filamentmastery.com/articles/laravel-filament-backend-starter-build-your-admin-panel-fast" rel="noopener noreferrer"&gt;Backend Starter&lt;/a&gt;&lt;/strong&gt;&lt;/th&gt;
&lt;th&gt;&lt;strong&gt;&lt;a href="https://filamentmastery.com/articles/laravel-filament-multipanel-starter-build-your-app-fast" rel="noopener noreferrer"&gt;Multipanel Starter&lt;/a&gt;&lt;/strong&gt;&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Laravel version&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Laravel 12&lt;/td&gt;
&lt;td&gt;Laravel 12&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Filament version&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;v4&lt;/td&gt;
&lt;td&gt;v4&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Backend Panel&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;✅&lt;/td&gt;
&lt;td&gt;✅&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Member Panel (User Portal)&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;❌&lt;/td&gt;
&lt;td&gt;✅ User panel with login, registration, profile&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Panel-Specific Middleware &amp;amp; Routes&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;✅&lt;/td&gt;
&lt;td&gt;✅ Per panel config &amp;amp; middleware&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Subdomain or Path Routing&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;✅&lt;/td&gt;
&lt;td&gt;✅ &lt;em&gt;(separate for each panel)&lt;/em&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Authentication via Email Invitation&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;✅&lt;/td&gt;
&lt;td&gt;✅&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Password Reset on First Login&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;✅&lt;/td&gt;
&lt;td&gt;✅&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Multi-factor authentication&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;✅ (App authentication)&lt;/td&gt;
&lt;td&gt;✅ (App authentication)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Roles &amp;amp; Permissions (Spatie)&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;✅&lt;/td&gt;
&lt;td&gt;✅&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Timezone Management&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;✅&lt;/td&gt;
&lt;td&gt;✅&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;User Profile Management&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;✅&lt;/td&gt;
&lt;td&gt;✅&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Logs Viewer (Opcodes)&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;✅&lt;/td&gt;
&lt;td&gt;✅ &lt;em&gt;(protected backend user)&lt;/em&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Laravel Horizon&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;✅&lt;/td&gt;
&lt;td&gt;✅ &lt;em&gt;(protected backend user)&lt;/em&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Dark Mode &amp;amp; Theme Ready&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;✅&lt;/td&gt;
&lt;td&gt;✅&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Multi-language Support&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;✅&lt;/td&gt;
&lt;td&gt;✅&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Dev Tools (Debugbar, PHPStan, Pint)&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;✅&lt;/td&gt;
&lt;td&gt;✅&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Ready for SaaS Admin Panel&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;✅&lt;/td&gt;
&lt;td&gt;✅&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Ready for Public-Facing User Portal&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;❌&lt;/td&gt;
&lt;td&gt;✅ &lt;em&gt;(ideal for memberships)&lt;/em&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Use Case&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Internal tools, dashboard.&lt;/td&gt;
&lt;td&gt;Full-stack app (admin + users)&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h2&gt;
  
  
  Get it now
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://buy.stripe.com/cNibJ16Ardkb3ZOfNQ3wQ02" rel="noopener noreferrer"&gt;👉 Get Laravel Filament Multipanel Template&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;a href="https://filamentmastery.com/member" rel="noopener noreferrer"&gt;Register or connect&lt;/a&gt; to your panel and get 10% off from the &lt;a href="https://filamentmastery.com/member/offers?tableFilters%5Bpartner_id%5D%5Bvalue%5D=3" rel="noopener noreferrer"&gt;offers page&lt;/a&gt;&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
&lt;em&gt;You will receive your ZIP template by mail. Your purchase grants you the right to use this starter template on unlimited personal or client projects. Reselling or redistributing the code as a standalone product is not allowed.&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Visual overview
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fw99jji7ihpepv91yqvs2.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fw99jji7ihpepv91yqvs2.png" alt="Laravel Filament Backend Login Page – Secure Access" width="800" height="458"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fy59f01k3zkqo3h7yytbe.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fy59f01k3zkqo3h7yytbe.png" alt="Laravel Filament Backend Dashboard Overview" width="800" height="458"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fnjfy8sh5bajvd46vdrtl.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fnjfy8sh5bajvd46vdrtl.png" alt="Members Management List in Laravel Filament" width="800" height="458"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8fpmucfscs4hr3gwx5km.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8fpmucfscs4hr3gwx5km.png" alt="Members Management Edit in Laravel Filament" width="800" height="458"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fktkg4etn7nsspswr8icv.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fktkg4etn7nsspswr8icv.png" alt="Laravel Filament Member Panel Profile" width="800" height="458"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fsbgnjer0uwam79x1dabk.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fsbgnjer0uwam79x1dabk.png" alt="Laravel Filament Member Dashboard Overview" width="800" height="458"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fitd9qz3phkjifbmgwc80.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fitd9qz3phkjifbmgwc80.png" alt="Laravel Filament Member Panel Registration" width="800" height="458"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fedohtum40ifxb7o25sa8.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fedohtum40ifxb7o25sa8.png" alt="Laravel Filament Multi Panel Multi auth" width="800" height="458"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F6aqpo78jozfzhcbrghkc.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F6aqpo78jozfzhcbrghkc.png" alt="Multi-factor authentication with Recovery codes in filament panel" width="800" height="458"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  What’s next?
&lt;/h2&gt;

&lt;p&gt;I'm working on &lt;strong&gt;more Filament templates and plugins&lt;/strong&gt; to make your life easier.&lt;a href="https://filamentmastery.com/member" rel="noopener noreferrer"&gt;Register to Filament Mastery&lt;/a&gt; for updates and new releases.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://buy.stripe.com/cNibJ16Ardkb3ZOfNQ3wQ02" rel="noopener noreferrer"&gt;👉 Get Laravel Filament Multipanel Template&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Like this article if you'd like me to share more starter kits!&lt;/strong&gt;&lt;/p&gt;

</description>
      <category>filament</category>
      <category>laravel</category>
      <category>php</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Laravel Filament Backend Starter – Build your admin panel fast</title>
      <dc:creator>yebor974</dc:creator>
      <pubDate>Wed, 13 Aug 2025 11:19:28 +0000</pubDate>
      <link>https://dev.to/filamentmastery/laravel-filament-backend-starter-build-your-admin-panel-fast-2447</link>
      <guid>https://dev.to/filamentmastery/laravel-filament-backend-starter-build-your-admin-panel-fast-2447</guid>
      <description>&lt;p&gt;Looking for a &lt;strong&gt;ready-to-use admin panel&lt;/strong&gt; for your Laravel projects? Meet &lt;strong&gt;Laravel Filament Backend Starter&lt;/strong&gt; — a clean, opinionated starter kit designed to help you &lt;strong&gt;ship faster&lt;/strong&gt; with &lt;strong&gt;Laravel 12&lt;/strong&gt; and &lt;strong&gt;Filament PHP v4&lt;/strong&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  What’s included?
&lt;/h2&gt;

&lt;p&gt;Setting up a secure and well-structured backend can take hours. With this starter, you get:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;A fully functional backend panel&lt;/strong&gt; — accessible via &lt;strong&gt;subdomain&lt;/strong&gt; (&lt;code&gt;backend.yourdomain.com&lt;/code&gt;) or &lt;strong&gt;path&lt;/strong&gt; (&lt;code&gt;yourdomain.com/backend&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Secure authentication&lt;/strong&gt; — with &lt;strong&gt;email invitations&lt;/strong&gt; and &lt;strong&gt;password renewal on first login&lt;/strong&gt; (using &lt;a href="https://github.com/yebor974/filament-renew-password" rel="noopener noreferrer"&gt;Filament Renew Password&lt;/a&gt;) and &lt;strong&gt;multi-factor authentication with App authentication&lt;/strong&gt; (not required).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;User management out of the box&lt;/strong&gt; — powered by &lt;a href="https://github.com/spatie/laravel-permission" rel="noopener noreferrer"&gt;Spatie Laravel Permission&lt;/a&gt;, with roles, permissions, and policies pre-seeded.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;User profile management&lt;/strong&gt; (email, name, password, timezone)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Light &amp;amp; Dark theme switch&lt;/strong&gt; + &lt;strong&gt;empty custom theme ready&lt;/strong&gt; to be extended&lt;/li&gt;
&lt;li&gt;Database notifications (Filament native support)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;a href="https://github.com/opcodesio/log-viewer" rel="noopener noreferrer"&gt;Logs Viewer&lt;/a&gt; integration&lt;/strong&gt; — protected by auth &amp;amp; backend role&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;a href="https://laravel.com/docs/horizon" rel="noopener noreferrer"&gt;Laravel Horizon&lt;/a&gt;&lt;/strong&gt; — queued jobs management — protected by auth and backend role&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Timezone management&lt;/strong&gt; from user profile&lt;/li&gt;
&lt;li&gt;Centralized &lt;strong&gt;date display settings&lt;/strong&gt; (&lt;code&gt;TextColumn&lt;/code&gt;, &lt;code&gt;DateTimePicker&lt;/code&gt;) on &lt;code&gt;AppServiceProvider&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Default &lt;strong&gt;password policy&lt;/strong&gt; (min 12 characters, mixed case, numbers, symbols) on &lt;code&gt;AppServiceProvider&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Fully &lt;strong&gt;localized&lt;/strong&gt; , default to 🇬🇧 english. Extends with your own languages&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Dev-friendly&lt;/strong&gt; tools with &lt;a href="https://github.com/barryvdh/laravel-debugbar" rel="noopener noreferrer"&gt;Laravel Debugbar&lt;/a&gt;, &lt;a href="https://phpstan.org/" rel="noopener noreferrer"&gt;PHPStan&lt;/a&gt; for static analysis and &lt;a href="https://laravel.com/docs/pint" rel="noopener noreferrer"&gt;Pint&lt;/a&gt; for consistent code formatting&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Instead of reinventing the wheel every time you need a &lt;strong&gt;secure admin panel&lt;/strong&gt; , this template gives you a &lt;strong&gt;solid, scalable foundation&lt;/strong&gt; —with the best practices already in place.&lt;/p&gt;

&lt;h2&gt;
  
  
  Tech stack highlights
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Laravel 12&lt;/li&gt;
&lt;li&gt;Filament PHP v4&lt;/li&gt;
&lt;li&gt;Tailwind CSS v4&lt;/li&gt;
&lt;li&gt;PHP 8.2+&lt;/li&gt;
&lt;li&gt;PostgreSQL / MySQL&lt;/li&gt;
&lt;li&gt;Redis &amp;amp; Laravel Horizon&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Who is it for?
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;✅ SaaS admin panel&lt;/li&gt;
&lt;li&gt;✅ Internal dashboard&lt;/li&gt;
&lt;li&gt;❌ Not intended for public-facing user portals (for a double panels, backend and member, you can see &lt;a href="https://filamentmastery.com/articles/laravel-filament-backend-starter-build-your-admin-panel-fast" rel="noopener noreferrer"&gt;Laravel Filament Multipanel Starter&lt;/a&gt;)&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Compare Starter Templates
&lt;/h3&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Feature / Module&lt;/th&gt;
&lt;th&gt;&lt;strong&gt;&lt;a href="https://filamentmastery.com/articles/laravel-filament-backend-starter-build-your-admin-panel-fast" rel="noopener noreferrer"&gt;Backend Starter&lt;/a&gt;&lt;/strong&gt;&lt;/th&gt;
&lt;th&gt;&lt;strong&gt;&lt;a href="https://filamentmastery.com/articles/laravel-filament-multipanel-starter-build-your-app-fast" rel="noopener noreferrer"&gt;Multipanel Starter&lt;/a&gt;&lt;/strong&gt;&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Laravel version&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Laravel 12&lt;/td&gt;
&lt;td&gt;Laravel 12&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Filament version&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;v4&lt;/td&gt;
&lt;td&gt;v4&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Backend Panel&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;✅&lt;/td&gt;
&lt;td&gt;✅&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Member Panel (User Portal)&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;❌&lt;/td&gt;
&lt;td&gt;✅ User panel with login, registration, profile&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Panel-Specific Middleware &amp;amp; Routes&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;✅&lt;/td&gt;
&lt;td&gt;✅ Per panel config &amp;amp; middleware&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Subdomain or Path Routing&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;✅&lt;/td&gt;
&lt;td&gt;✅ &lt;em&gt;(separate for each panel)&lt;/em&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Authentication via Email Invitation&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;✅&lt;/td&gt;
&lt;td&gt;✅&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Password Reset on First Login&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;✅&lt;/td&gt;
&lt;td&gt;✅&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Multi-factor authentication&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;✅ (App authentication)&lt;/td&gt;
&lt;td&gt;✅ (App authentication)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Roles &amp;amp; Permissions (Spatie)&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;✅&lt;/td&gt;
&lt;td&gt;✅&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Timezone Management&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;✅&lt;/td&gt;
&lt;td&gt;✅&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;User Profile Management&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;✅&lt;/td&gt;
&lt;td&gt;✅&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Logs Viewer (Opcodes)&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;✅&lt;/td&gt;
&lt;td&gt;✅ &lt;em&gt;(protected backend user)&lt;/em&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Laravel Horizon&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;✅&lt;/td&gt;
&lt;td&gt;✅ &lt;em&gt;(protected backend user)&lt;/em&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Dark Mode &amp;amp; Theme Ready&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;✅&lt;/td&gt;
&lt;td&gt;✅&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Multi-language Support&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;✅&lt;/td&gt;
&lt;td&gt;✅&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Dev Tools (Debugbar, PHPStan, Pint)&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;✅&lt;/td&gt;
&lt;td&gt;✅&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Ready for SaaS Admin Panel&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;✅&lt;/td&gt;
&lt;td&gt;✅&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Ready for Public-Facing User Portal&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;❌&lt;/td&gt;
&lt;td&gt;✅ &lt;em&gt;(ideal for memberships)&lt;/em&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Use Case&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Internal tools, dashboard.&lt;/td&gt;
&lt;td&gt;Full-stack app (admin + users)&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h2&gt;
  
  
  Get it now
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://buy.stripe.com/eVqbJ12kbcg72VKbxA3wQ01" rel="noopener noreferrer"&gt;👉 Get Laravel Filament Backend Template&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;a href="https://filamentmastery.com/member" rel="noopener noreferrer"&gt;Register or connect&lt;/a&gt; to your panel and get 10% off from the &lt;a href="https://filamentmastery.com/member/offers?tableFilters%5Bpartner_id%5D%5Bvalue%5D=3" rel="noopener noreferrer"&gt;offers page&lt;/a&gt;&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
&lt;em&gt;You will receive your ZIP template by mail. Your purchase grants you the right to use this starter template on unlimited personal or client projects. Reselling or redistributing the code as a standalone product is not allowed.&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Visual overview
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Filx23hr9t1d06w88ubeo.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Filx23hr9t1d06w88ubeo.png" alt="Laravel Filament Backend Login Page – Secure Access" width="800" height="458"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8f4xtwv5jrayjw0wb3sy.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8f4xtwv5jrayjw0wb3sy.png" alt="Laravel Filament Backend Dashboard Overview" width="800" height="458"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fr38i5tlya2sqdgypyurc.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fr38i5tlya2sqdgypyurc.png" alt="User Profile Management in Laravel Filament Backend" width="800" height="458"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fhhjahpn4nhqrpq4nv8l0.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fhhjahpn4nhqrpq4nv8l0.png" alt="Backend Users Management Edit in Laravel Filament" width="800" height="458"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbvt178gnxs9aslmm9a0s.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbvt178gnxs9aslmm9a0s.png" alt="Backend Users Management List in Laravel Filament" width="800" height="458"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fcaskkvqxs19gs950nnzl.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fcaskkvqxs19gs950nnzl.png" alt="Multi-factor authentication with App authentication in filament panel" width="800" height="458"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F6aqpo78jozfzhcbrghkc.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F6aqpo78jozfzhcbrghkc.png" alt="Multi-factor authentication with Recovery codes in filament panel" width="800" height="458"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fsvnx6qipnav4sup7r45e.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fsvnx6qipnav4sup7r45e.png" alt="Multi-factor authentication sign in in filament panel" width="800" height="458"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Flzjtnm81ov1lceapvptz.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Flzjtnm81ov1lceapvptz.png" alt="Password Reset Page on First Login in Laravel Filament Backend" width="800" height="458"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fa1konnmhxva4ojxsdxf3.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fa1konnmhxva4ojxsdxf3.png" alt="Email Invitation for Laravel Filament Backend Access" width="800" height="452"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  What’s next?
&lt;/h2&gt;

&lt;p&gt;I'm working on &lt;strong&gt;more Filament templates and plugins&lt;/strong&gt; to make your life easier.&lt;a href="https://filamentmastery.com/member" rel="noopener noreferrer"&gt;Register to Filament Mastery&lt;/a&gt; for updates and new releases.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://buy.stripe.com/eVqbJ12kbcg72VKbxA3wQ01" rel="noopener noreferrer"&gt;👉 Get Laravel Filament Backend Template&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Like this article if you'd like me to share more starter kits!&lt;/strong&gt;&lt;/p&gt;

</description>
      <category>filament</category>
      <category>laravel</category>
      <category>php</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Handle authorization in Filament: Policies, Roles &amp; Guards</title>
      <dc:creator>yebor974</dc:creator>
      <pubDate>Tue, 05 Aug 2025 08:32:29 +0000</pubDate>
      <link>https://dev.to/filamentmastery/handle-authorization-in-filament-policies-roles-guards-4h54</link>
      <guid>https://dev.to/filamentmastery/handle-authorization-in-filament-policies-roles-guards-4h54</guid>
      <description>&lt;p&gt;If you're building an admin panel with &lt;a href="https://filamentphp.com/" rel="noopener noreferrer"&gt;FilamentPHP&lt;/a&gt; and wondering:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;“How can I control what each user can access or modify?”&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;You're asking the right question, and you're about to get a clear, updated answer.&lt;/p&gt;

&lt;p&gt;In this guide, we’ll explore &lt;strong&gt;how authorization works in Filament&lt;/strong&gt; , how it integrates with &lt;strong&gt;Laravel policy system&lt;/strong&gt; , and how you can control user access with clarity.&lt;/p&gt;

&lt;h2&gt;
  
  
  🧱 What is authorization in Filament?
&lt;/h2&gt;

&lt;p&gt;Filament builds on top of &lt;strong&gt;Laravel's native authorization layer&lt;/strong&gt; , mainly using:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The &lt;code&gt;FilamentUser&lt;/code&gt; interface to control access to the admin panel&lt;/li&gt;
&lt;li&gt;Laravel Policies to control permissions on resources&lt;/li&gt;
&lt;li&gt;Optional integration with Spatie Permissions or Filament Shield for roles&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Let’s dive into each layer.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 1: Granting access to the Admin Panel
&lt;/h2&gt;

&lt;p&gt;To prevent unauthorized users from accessing your admin interface, Filament requires your &lt;code&gt;User&lt;/code&gt; model to implement the &lt;code&gt;FilamentUser&lt;/code&gt; interface.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;use Filament\Models\Contracts\FilamentUser;

class User extends Authenticatable implements FilamentUser
{
    public function canAccessPanel(Panel $panel): bool
    {
        return $this-&amp;gt;is_admin; // Or check for roles/permissions here
    }
}

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You can check any logic you want — roles, teams, email domains, etc.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;If you forgot to implement &lt;code&gt;FilamentUser&lt;/code&gt; and to define &lt;code&gt;canAccessPanel()&lt;/code&gt; method, your panel may be exposed to all authenticated users.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Step 2: Using Policies in Laravel
&lt;/h2&gt;

&lt;p&gt;Since &lt;strong&gt;Laravel 11+&lt;/strong&gt; , policies are auto-discovered — you don't need to register them manually.&lt;/p&gt;

&lt;h3&gt;
  
  
  Create a policy:
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;php artisan make:policy PostPolicy --model=Post

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then define your authorization logic:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;public function update(User $user, Post $post): bool
{
    return $user-&amp;gt;id === $post-&amp;gt;author_id;
}

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Filament will &lt;strong&gt;automatically apply these methods&lt;/strong&gt; in the UI (buttons, actions, forms) — no extra setup needed.&lt;/p&gt;

&lt;h2&gt;
  
  
  Supported policy methods in Filament
&lt;/h2&gt;

&lt;p&gt;Filament checks for a wide set of policy methods, depending on the action and the state of your model:&lt;/p&gt;

&lt;h3&gt;
  
  
  Basic Actions:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;code&gt;viewAny(User $user)&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;view(User $user, Post $post)&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;create(User $user)&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;update(User $user, Post $post)&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;delete(User $user, Post $post)&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;deleteAny(User $user)&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Soft Delete support:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;code&gt;restore(User $user, Post $post)&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;restoreAny(User $user)&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;forceDelete(User $user, Post $post)&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;forceDeleteAny(User $user)&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Filament doesn't call these soft delete policies unless the corresponding actions are explicitly enabled in the resource.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;If no policy is registered for a model, Laravel allows the action. But if a policy exists and the required method is missing, Laravel will deny access.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Step 3: Overriding permissions directly in a Filament Resource
&lt;/h2&gt;

&lt;p&gt;For quick use cases, you can override permission methods directly in your &lt;code&gt;Resource&lt;/code&gt; class instead of defining a full policy:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;public static function canCreate(): bool
{
    return auth()-&amp;gt;user()-&amp;gt;is_admin;
}

public function canEdit(Model $record): bool
{
    return $record-&amp;gt;author_id === auth()-&amp;gt;id();
}

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  But be careful:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;This is great for simple logic.&lt;/li&gt;
&lt;li&gt;For consistency, prefer &lt;strong&gt;policies&lt;/strong&gt; in production apps with more than one resource.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Step 4: Add roles &amp;amp; permissions management
&lt;/h2&gt;

&lt;p&gt;If you need a full &lt;strong&gt;role/permission system&lt;/strong&gt; , you can integrate:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://spatie.be/docs/laravel-permission" rel="noopener noreferrer"&gt;Spatie Laravel Permission&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/bezhanSalleh/filament-shield" rel="noopener noreferrer"&gt;Filament Shield Plugin&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;or others&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  What Laravel Spatie Permission gives you?
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://spatie.be/docs/laravel-permission" rel="noopener noreferrer"&gt;Spatie Laravel Permission&lt;/a&gt; is a powerful package that adds role and permission management directly to your Laravel app. It doesn’t depend on Filament but integrates nicely.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Create and assign &lt;strong&gt;roles&lt;/strong&gt; (e.g. &lt;code&gt;admin&lt;/code&gt;, &lt;code&gt;editor&lt;/code&gt;, &lt;code&gt;user&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;Define granular &lt;strong&gt;permissions&lt;/strong&gt; (e.g. &lt;code&gt;edit post&lt;/code&gt;, &lt;code&gt;delete user&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;Attach permissions to users or roles&lt;/li&gt;
&lt;li&gt;Use Laravel’s native &lt;code&gt;can()&lt;/code&gt; and &lt;code&gt;@can&lt;/code&gt; directives&lt;/li&gt;
&lt;li&gt;Built-in artisan commands for role/permission management&lt;/li&gt;
&lt;li&gt;Supports multiple guards (e.g. &lt;code&gt;web&lt;/code&gt;, &lt;code&gt;admin&lt;/code&gt;)&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  Example usage:
&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$user-&amp;gt;assignRole('editor');
$user-&amp;gt;hasPermissionTo('edit articles');

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In Filament, you can check these with:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;return auth()-&amp;gt;user()-&amp;gt;can('edit articles');

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;&lt;a href="https://spatie.be/docs/laravel-permission" rel="noopener noreferrer"&gt;Spatie Laravel Permission&lt;/a&gt; is a solid foundation&lt;/strong&gt; if you want to control access but don’t need a full UI like Filament Shield.&lt;/p&gt;

&lt;h3&gt;
  
  
  What Filament Shield give you?
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://github.com/bezhanSalleh/filament-shield" rel="noopener noreferrer"&gt;Filament Shield Plugin&lt;/a&gt; is based on &lt;a href="https://spatie.be/docs/laravel-permission" rel="noopener noreferrer"&gt;Spatie Laravel Permission&lt;/a&gt; and adds a full UI and auto-permission system for Filament with:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Role/permission UI inside your Filament panel&lt;/li&gt;
&lt;li&gt;Auto-generated permissions for each resource/action&lt;/li&gt;
&lt;li&gt;Seamless integration with Laravel policies&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Once installed, you can assign permissions like &lt;code&gt;view_user&lt;/code&gt;, &lt;code&gt;create_post&lt;/code&gt;, &lt;code&gt;delete_order&lt;/code&gt;, etc., per role or user.&lt;/p&gt;

&lt;h2&gt;
  
  
  About auth guards in Filament
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Filament&lt;/strong&gt; uses the guard defined in your panel configuration under &lt;code&gt;auth.guard&lt;/code&gt;. This might be &lt;code&gt;web&lt;/code&gt;, or any other name you choose.&lt;/p&gt;

&lt;p&gt;If you're using Spatie Laravel Permission (or any other permission system based on guards), you &lt;strong&gt;must specify the correct guard&lt;/strong&gt; when checking for permissions.&lt;/p&gt;

&lt;h3&gt;
  
  
  Example with &lt;code&gt;hasPermissionTo()&lt;/code&gt; of Spatie and Filament's guard:
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;public function delete(User $user, Team $team): bool
{
    return $user-&amp;gt;hasPermissionTo('delete team', filament()-&amp;gt;getAuthGuard());
}

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;Without specifying the guard, &lt;code&gt;hasPermissionTo()&lt;/code&gt; may look at the default guard. Make sure your permissions and roles are created for the &lt;strong&gt;same guard&lt;/strong&gt; you're using in your checks.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;If you're unsure how guards work or how to configure them, check out our dedicated article:&lt;/p&gt;

&lt;p&gt;👉 &lt;a href="https://filamentmastery.com/articles/implementing-filament-auth-guard" rel="noopener noreferrer"&gt;How Auth Guards Work in Filament&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Final thoughts
&lt;/h2&gt;

&lt;p&gt;Filament makes authorization much easier by staying close to Laravel’s standards — but with a few important extras.&lt;/p&gt;

&lt;p&gt;✅ Use &lt;code&gt;FilamentUser&lt;/code&gt; to control access to the admin panel&lt;br&gt;&lt;br&gt;
✅ Use &lt;strong&gt;Laravel policies&lt;/strong&gt; for clean, scalable access control&lt;br&gt;&lt;br&gt;
✅ For role-based systems, consider &lt;a href="https://github.com/bezhanSalleh/filament-shield" rel="noopener noreferrer"&gt;Filament Shield Plugin&lt;/a&gt; or &lt;a href="https://spatie.be/docs/laravel-permission" rel="noopener noreferrer"&gt;Spatie Laravel Permission&lt;/a&gt; (my favorites)&lt;br&gt;&lt;br&gt;
✅ Mind the guards, soft deletes, and policy naming&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Get your authorization right early — it’s a foundation your app’s integrity will depend on.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;🙏 If this article helped you, &lt;strong&gt;share it&lt;/strong&gt; with your team, give it a &lt;strong&gt;like&lt;/strong&gt; , and consider &lt;strong&gt;registering&lt;/strong&gt; to &lt;a href="https://filamentmastery.com" rel="noopener noreferrer"&gt;Filament Mastery&lt;/a&gt; — your go-to resource for mastering Laravel Filament.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Don’t start from scratch!&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
My new &lt;strong&gt;Filament Backend Template&lt;/strong&gt; is the fastest way to start your next Laravel + Filament admin panel.&lt;br&gt;&lt;br&gt;
&lt;strong&gt;Pre-configured roles, permissions, Horizon, and more.&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
&lt;a href="https://filamentmastery.com/articles/laravel-filament-backend-starter-build-your-admin-panel-fast" rel="noopener noreferrer"&gt;&lt;strong&gt;Start building faster&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

</description>
      <category>filament</category>
      <category>laravel</category>
      <category>php</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Introducing Community Links: Share your favorite resources</title>
      <dc:creator>yebor974</dc:creator>
      <pubDate>Sun, 03 Aug 2025 06:35:56 +0000</pubDate>
      <link>https://dev.to/filamentmastery/introducing-community-links-share-your-favorite-resources-4bm7</link>
      <guid>https://dev.to/filamentmastery/introducing-community-links-share-your-favorite-resources-4bm7</guid>
      <description>&lt;p&gt;We’re excited to introduce a brand-new feature: &lt;strong&gt;Community Links&lt;/strong&gt; — a simple yet powerful way to share your favorite plugins, articles and resources with the rest of the community.&lt;/p&gt;

&lt;p&gt;Whether you stumbled upon a helpful blog post, launched your own side project, or discovered a time-saving tool, you can now &lt;strong&gt;submit it directly&lt;/strong&gt; to the community — and we’ll help spread the word.&lt;/p&gt;

&lt;h2&gt;
  
  
  How to share your link
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Not registered yet?&lt;/strong&gt; 👉 &lt;a href="https://filamentmastery.com/member/register" rel="noopener noreferrer"&gt;Create your account here&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Ready to share?&lt;/strong&gt; 👉 &lt;a href="https://filamentmastery.com/member/community-links/create" rel="noopener noreferrer"&gt;Submit a new Community Link&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Browse all shared links&lt;/strong&gt; 👉 &lt;a href="https://filamentmastery.com/community-links" rel="noopener noreferrer"&gt;See public Community Links&lt;/a&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;We’ve made it quick and easy, with a simple form to add your title, URL, and a short comment.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7a4p3f3vcmw5tv9pbn86.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7a4p3f3vcmw5tv9pbn86.png" width="800" height="382"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  📬 Featured in the Newsletter
&lt;/h2&gt;

&lt;p&gt;Selected Community Links are &lt;strong&gt;featured in our newsletter&lt;/strong&gt; , giving your submissions the visibility they deserve. Each link is automatically tracked, so you can &lt;strong&gt;see how many clicks your shared resource received&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Whether you're a content creator or just want to support cool stuff, Community Links is the easiest way to contribute.&lt;/p&gt;

&lt;h2&gt;
  
  
  📈 Real-Time click tracking
&lt;/h2&gt;

&lt;p&gt;Want to know if your link is getting attention? You’ll find a simple dashboard that tracks the number of clicks on your links — perfect for measuring engagement and visibility.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ful4l2nltcz0rwpa67tor.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ful4l2nltcz0rwpa67tor.png" width="800" height="382"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Why it matters
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;No need to write long articles — just share a cool link&lt;/li&gt;
&lt;li&gt;Get visibility through our newsletter&lt;/li&gt;
&lt;li&gt;Help others discover useful tools, insights, and projects&lt;/li&gt;
&lt;li&gt;Track performance with click counts&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If you enjoyed this feature, don’t forget to give this article a like and share it with your network — let’s grow the community together! 🚀&lt;/p&gt;

</description>
      <category>filament</category>
      <category>laravel</category>
      <category>php</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Customizing Filament User Model</title>
      <dc:creator>yebor974</dc:creator>
      <pubDate>Tue, 29 Jul 2025 12:34:30 +0000</pubDate>
      <link>https://dev.to/filamentmastery/customizing-filament-user-model-270m</link>
      <guid>https://dev.to/filamentmastery/customizing-filament-user-model-270m</guid>
      <description>&lt;p&gt;Filament offers significant flexibility for tailoring the &lt;code&gt;User&lt;/code&gt; model to meet the specific needs of your application. Below are some commonly used configurations.&lt;/p&gt;

&lt;h2&gt;
  
  
  Managing Avatar with the &lt;code&gt;HasAvatar&lt;/code&gt; Trait
&lt;/h2&gt;

&lt;p&gt;To associate an avatar with each user, you can use the &lt;code&gt;HasAvatar&lt;/code&gt; trait. This trait simplifies avatar management by providing ready-to-use methods.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;use Filament\Models\Concerns\HasAvatar;

class User extends Authenticatable
{
    use HasAvatar;

    // ...
}

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The &lt;code&gt;HasAvatar&lt;/code&gt; trait assumes that your &lt;code&gt;User&lt;/code&gt; model has an avatar image path like &lt;code&gt;avatar_url&lt;/code&gt; attribute. You can customize the &lt;code&gt;getFilamentAvatarUrl()&lt;/code&gt; method to define the logic for retrieving the avatar URL:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;public function getFilamentAvatarUrl(): ?string
{
    return $this-&amp;gt;avatar_url ? asset('storage/' . $this-&amp;gt;avatar_url) : null;
}

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;A quick tip for removing an already registered avatar on a user is to define a setter on the &lt;code&gt;avatar_url&lt;/code&gt; attribute (you have to specify your storage path / disk):&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;protected function avatarUrl(): Attribute
{
    return Attribute::make(
        set: function (?string $value) {
            if (!empty($this-&amp;gt;avatar_url) &amp;amp;&amp;amp; (is_null($value) || $value !== $this-&amp;gt;avatar_url)) {
                Storage::disk('public')-&amp;gt;delete($this-&amp;gt;avatar_url);
            }

            return $value;
        },
    );
}

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This code will delete previous avatar file for the updated user.&lt;/p&gt;

&lt;h2&gt;
  
  
  Managing Name with the &lt;code&gt;HasName&lt;/code&gt; Trait
&lt;/h2&gt;

&lt;p&gt;To handle user name, the &lt;code&gt;HasName&lt;/code&gt; trait can be used. It allows you to easily define and retrieve the user's full name.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;use Filament\Models\Concerns\HasName;

class User extends Authenticatable
{
    use HasName;

    // ...
}

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;By default, Filament use the &lt;code&gt;name&lt;/code&gt; attribute. If your model uses different attributes, you can override the corresponding method to adapt the logic to your database structure:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;public function getFilamentName(): string
{
    return $this-&amp;gt;username;
}

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Controlling Access with the &lt;code&gt;FilamentUser&lt;/code&gt; Interface
&lt;/h2&gt;

&lt;p&gt;To restrict access to Filament panels, implement the &lt;code&gt;FilamentUser&lt;/code&gt; interface in your &lt;code&gt;User&lt;/code&gt; model. This allows you to define specific rules to determine which users can access different sections of the admin panel.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;use Filament\Models\Contracts\FilamentUser;
use Filament\Panel;

class User extends Authenticatable implements FilamentUser
{
    // ...

    public function canAccessPanel(Panel $panel): bool
    {
        // Logic to determine if the user can access the panel
        return $this-&amp;gt;hasRole('admin');
    }
}

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In this example, only users with the &lt;code&gt;admin&lt;/code&gt; role can access the Filament panel. Adjust the logic in the &lt;code&gt;canAccessPanel()&lt;/code&gt; method according to your application's needs.&lt;/p&gt;

&lt;h2&gt;
  
  
  Multi-Tenant Configuration
&lt;/h2&gt;

&lt;p&gt;Multi-tenant management enables your application to serve multiple clients from a single instance, isolating each client's data. Filament provides tools to facilitate this configuration, but it's essential to understand the security and structural implications for your application.&lt;/p&gt;

&lt;p&gt;For a detailed implementation of multi-tenant configuration in Filament, you can read &lt;a href="https://filamentmastery.com/articles/building-a-laravel-filament-multi-tenant-panel" rel="noopener noreferrer"&gt;this article&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;This article provides step-by-step instructions to configure a multi-tenant application with Filament.&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;Customizing the &lt;code&gt;User&lt;/code&gt; model in Filament is crucial to tailoring your application to the specific needs of your users. By leveraging appropriate traits and interfaces, you can efficiently manage avatars, names, panel access, and more.&lt;/p&gt;

&lt;p&gt;You can view some of these configurations directly in the Filament Mastery back office, such as modifying your avatar in your profile.&lt;/p&gt;

&lt;p&gt;📬 &lt;a href="https://filamentmastery.com/member/register" rel="noopener noreferrer"&gt;Join the community on filamentmastery.com&lt;/a&gt; — it's free!&lt;/p&gt;

</description>
      <category>filament</category>
      <category>laravel</category>
      <category>php</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Enforcing password updates for admin-created user accounts</title>
      <dc:creator>yebor974</dc:creator>
      <pubDate>Wed, 23 Jul 2025 16:25:09 +0000</pubDate>
      <link>https://dev.to/filamentmastery/enforcing-password-updates-for-admin-created-user-accounts-10el</link>
      <guid>https://dev.to/filamentmastery/enforcing-password-updates-for-admin-created-user-accounts-10el</guid>
      <description>&lt;p&gt;Managing user accounts in web applications often involves administrators creating accounts for users. In such cases, ensuring account security is paramount. One effective measure is to force users to reset their password upon their first login. This practice not only reinforces security but also allows users to set a password they prefer.&lt;/p&gt;

&lt;p&gt;This article uses the &lt;a href="https://github.com/yebor974/filament-renew-password" rel="noopener noreferrer"&gt;Filament Renew Password Plugin&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 1: Install and register the plugin on panel
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;composer require yebor974/filament-renew-password

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Publish default plugin migration that will add two columns to users table : &lt;code&gt;last_password_renew_at&lt;/code&gt; and &lt;code&gt;force_renew_password&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;php artisan vendor:publish --tag="filament-renew-password-migrations"
php artisan migrate

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Register the plugin to panel and add force renewal process and timestamp management.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;use Yebor974\Filament\RenewPassword\RenewPasswordPlugin;

public function panel(Panel $panel): Panel
{
    return $panel
        -&amp;gt;plugin(
            (new RenewPasswordPlugin())
                -&amp;gt;forceRenewPassword() // activate the force renewal process
                -&amp;gt;timestampColumn() // activate last_password_renew_at column, updating it with each password renewal.
        )
    );
}

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Step 2: Setup User Model
&lt;/h2&gt;

&lt;p&gt;Implement &lt;code&gt;RenewPasswordContract&lt;/code&gt; on User Model, add default &lt;code&gt;RenewPassword&lt;/code&gt; trait and declare &lt;code&gt;fillable&lt;/code&gt; attributes.&lt;/p&gt;

&lt;p&gt;For example, we just declare a name and email attributes for user.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;use Illuminate\Foundation\Auth\User as Authenticatable;
use Yebor974\Filament\RenewPassword\Contracts\RenewPasswordContract;
use Yebor974\Filament\RenewPassword\Traits\RenewPassword;
//...

class User extends Authenticatable implements RenewPasswordContract
{
    use RenewPassword;

    protected $fillable = [
        'name',
        'email',
        'force_renew_password'
    ];

    //...
}

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;If &lt;code&gt;force_renew_password&lt;/code&gt; attribute is set to true, the user will be automatically redirect to the renewal password process.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Step 3: Create UserResource
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;php artisan make:filament-resource User


class UserResource extends Resource
{
    protected static ?string $model = User::class;

    protected static ?string $navigationIcon = 'heroicon-o-users';

    public static function form(Form $form): Form
    {
        return $form
            -&amp;gt;schema([
                Forms\Components\Section::make()
                    -&amp;gt;schema([
                        TextInput::make('name')
                            -&amp;gt;required(),
                        TextInput::make('email')
                            -&amp;gt;required()
                            -&amp;gt;unique(ignoreRecord: true)
                    ])-&amp;gt;columns(2)
            ]);
    }

    public static function table(Table $table): Table
    {
        return $table
            -&amp;gt;columns([
                Tables\Columns\TextColumn::make('name')
                    -&amp;gt;searchable(),
                Tables\Columns\TextColumn::make('email')
                    -&amp;gt;searchable(),
                Tables\Columns\IconColumn::make('force_renew_password')
                    -&amp;gt;boolean()
            ])
            -&amp;gt;filters([
                //
            ])
            -&amp;gt;actions([
                Tables\Actions\EditAction::make(),
            ])
            -&amp;gt;bulkActions([
                Tables\Actions\BulkActionGroup::make([
                    Tables\Actions\DeleteBulkAction::make(),
                ]),
            ]);
    }

        //...
}

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fzj29zucnt0m21cgcvc7q.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fzj29zucnt0m21cgcvc7q.png" width="800" height="213"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 4: Generate a default password and send it with email notification
&lt;/h2&gt;

&lt;p&gt;Now, need to generate default password and invite user to connect and renew password. On &lt;code&gt;CreateUser.php&lt;/code&gt; page we have to override the &lt;code&gt;mutateFormDataBeforeCreate&lt;/code&gt; and &lt;code&gt;handleRecordCreation&lt;/code&gt; functions like that:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;class CreateUser extends CreateRecord
{
    protected static string $resource = UserResource::class;

    protected string $password;

    protected function mutateFormDataBeforeCreate(array $data): array
    {
        $this-&amp;gt;password = Str::password(12); // generate a default password with length of 12 caracters
        $data['password'] = bcrypt($this-&amp;gt;password);
        $data['force_renew_password'] = true; // to force user to renew password on next login

        return $data;
    }

    protected function handleRecordCreation(array $data): Model
    {
        /** @var User $user */
        $user = parent::handleRecordCreation($data); // handle the creation of the new user

        $user-&amp;gt;notify(new NewAccount($this-&amp;gt;password)); // notify the new user with account details

        return $user;
    }
}

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The &lt;code&gt;NewAccount&lt;/code&gt; notification class is:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;namespace App\Notifications;

use Illuminate\Bus\Queueable;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Notifications\Messages\MailMessage;
use Illuminate\Notifications\Notification;
use Illuminate\Support\HtmlString;

class NewAccount extends Notification
{
    use Queueable;

    /**
     * Create a new notification instance.
     */
    public function __construct(protected string $password, protected ?Model $tenant = null)
    {
        $this-&amp;gt;afterCommit();
    }

    /**
     * Get the notification's delivery channels.
     *
     * @return array&amp;lt;int, string&amp;gt;
     */
    public function via(object $notifiable): array
    {
        return ['mail'];
    }

    /**
     * Get the mail representation of the notification.
     */
    public function toMail(object $notifiable): MailMessage
    {
        $appName = config('app.name');

        return (new MailMessage)
            -&amp;gt;subject("Your account has been created on $appName")
            -&amp;gt;line("Here are your login details:")
            -&amp;gt;line(new HtmlString("&amp;lt;strong&amp;gt;Email&amp;lt;/strong&amp;gt; : {$notifiable-&amp;gt;email}"))
            -&amp;gt;line(new HtmlString("&amp;lt;strong&amp;gt;Temporary password&amp;lt;/strong&amp;gt; : {$this-&amp;gt;password}"))
            -&amp;gt;line("You will be prompted to change this temporary password at your next login.")
            -&amp;gt;action('Go to app', filament()-&amp;gt;getUrl($this-&amp;gt;tenant));
    }

    /**
     * Get the array representation of the notification.
     *
     * @return array&amp;lt;string, mixed&amp;gt;
     */
    public function toArray(object $notifiable): array
    {
        return [
            //
        ];
    }
}

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That's all!&lt;/p&gt;

&lt;h2&gt;
  
  
  Screenshots
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Create user&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fkxrjo35z7u1ku6ij54yf.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fkxrjo35z7u1ku6ij54yf.png" width="800" height="213"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fmu9ug0cpy3knr58svyqi.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fmu9ug0cpy3knr58svyqi.png" width="800" height="234"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Receive notification (with smtp mailpit mailer)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7hupzbw64lpomtqne3hi.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7hupzbw64lpomtqne3hi.png" width="800" height="391"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Login and renew password&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fwlfoxyh5zc5chj68ym31.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fwlfoxyh5zc5chj68ym31.png" width="800" height="284"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fz6cfhrmlsb5x80mxsgqk.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fz6cfhrmlsb5x80mxsgqk.png" width="800" height="402"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fnsblrwlzfuyqfad5fksw.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fnsblrwlzfuyqfad5fksw.png" width="800" height="272"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;📬 &lt;a href="https://filamentmastery.com" rel="noopener noreferrer"&gt;Join the community on filamentmastery.com&lt;/a&gt; — it's free!&lt;/p&gt;

</description>
      <category>filament</category>
      <category>laravel</category>
      <category>php</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Filament hiding records in table until filtered or searched</title>
      <dc:creator>yebor974</dc:creator>
      <pubDate>Mon, 21 Jul 2025 05:24:02 +0000</pubDate>
      <link>https://dev.to/filamentmastery/filament-hiding-records-in-table-until-filtered-or-searched-3g62</link>
      <guid>https://dev.to/filamentmastery/filament-hiding-records-in-table-until-filtered-or-searched-3g62</guid>
      <description>&lt;p&gt;If you have too many records in a single table to show immediately, you can hide them until a filter/search is applied.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;-&amp;gt;modifyQueryUsing(function (Builder $query, $livewire) {
    $hasFilters = collect($livewire-&amp;gt;tableFilters)
        -&amp;gt;filter(fn($filter) =&amp;gt; !empty($filter['values']))
        -&amp;gt;isNotEmpty();
    return ($livewire-&amp;gt;hasTableSearch() || $hasFilters) ? $query : $query-&amp;gt;whereRaw('1 = 0');
})

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Thanks to @ASSEM909_ for this nice tip!&lt;/p&gt;

&lt;p&gt;Want to share or discover more tips? Join &lt;a href="https://filamentmastery.com" rel="noopener noreferrer"&gt;Filament Mastery&lt;/a&gt;, it's free!&lt;/p&gt;

</description>
      <category>filament</category>
      <category>laravel</category>
      <category>php</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Quick installation and configuration of a Filament panel</title>
      <dc:creator>yebor974</dc:creator>
      <pubDate>Sun, 20 Jul 2025 12:54:09 +0000</pubDate>
      <link>https://dev.to/filamentmastery/quick-installation-and-configuration-of-a-filament-panel-1c8o</link>
      <guid>https://dev.to/filamentmastery/quick-installation-and-configuration-of-a-filament-panel-1c8o</guid>
      <description>&lt;p&gt;Filament PHP is a modern and powerful library that makes creating &lt;strong&gt;administration panels&lt;/strong&gt; for Laravel applications seamless. This article will guide you through the steps to install Filament, configure a panel, and allow an admin user to log in.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;What is a Filament panel?&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;A &lt;strong&gt;Filament panel&lt;/strong&gt; is a user interface designed to manage your Laravel application data. It’s ideal for dashboards, CRUD tools, and advanced administrative features.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Key advantages of Filament:&lt;/strong&gt;
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Modern and responsive interface&lt;/strong&gt; built with Tailwind CSS.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Quick setup&lt;/strong&gt; and developer-friendly commands.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Customizable and extendable&lt;/strong&gt; with plugins and advanced configurations.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Step 1: Set Up a Laravel project&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Before installing Filament, you need a working Laravel project. Create a new project using the following command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;composer create-project laravel/laravel your-project-name

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This command:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Install a new Laravel app instance&lt;/li&gt;
&lt;li&gt;Sets up a default &lt;code&gt;.env&lt;/code&gt; config file with sqlite&lt;/li&gt;
&lt;li&gt;Run the default migrations with tables like &lt;code&gt;users&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Step 2: Install Filament PHP&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;To add Filament to your Laravel project, follow these steps:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Install the package via Composer:&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Set up the Filament panel:&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;You’ll be prompted to enter a panel name (default: admin) and encouraged to star the Filament repository on GitHub. Go ahead and do it! 😊 This command:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Generates a new Service Provider &lt;code&gt;app/Providers/Filament/AdminPanelProvider.php&lt;/code&gt; or with your panel name alias.&lt;/li&gt;
&lt;li&gt;Sets up panel routes (default: &lt;code&gt;/admin&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;Installs necessary CSS and JavaScript files.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Your new Service Provider looks like that :&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;class AdminPanelProvider extends PanelProvider
{
    public function panel(Panel $panel): Panel
    {
        return $panel
            -&amp;gt;default()
            -&amp;gt;id('admin')
            -&amp;gt;path('admin')
            -&amp;gt;login()
            -&amp;gt;colors([
                'primary' =&amp;gt; Color::Amber,
            ])
            -&amp;gt;discoverResources(in: app_path('Filament/Resources'), for: 'App\\Filament\\Resources')
            -&amp;gt;discoverPages(in: app_path('Filament/Pages'), for: 'App\\Filament\\Pages')
            -&amp;gt;pages([
                Pages\Dashboard::class,
            ])
            -&amp;gt;discoverWidgets(in: app_path('Filament/Widgets'), for: 'App\\Filament\\Widgets')
            -&amp;gt;widgets([
                Widgets\AccountWidget::class,
                Widgets\FilamentInfoWidget::class,
            ])
            -&amp;gt;middleware([
                EncryptCookies::class,
                AddQueuedCookiesToResponse::class,
                StartSession::class,
                AuthenticateSession::class,
                ShareErrorsFromSession::class,
                VerifyCsrfToken::class,
                SubstituteBindings::class,
                DisableBladeIconComponents::class,
                DispatchServingFilamentEvent::class,
            ])
            -&amp;gt;authMiddleware([
                Authenticate::class,
            ]);
    }
}

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Of course, you can create multiple panels. For example, you could have an admin panel for administration with a specific guard and a member panel for users. The Filament Mastery blog uses a similar setup with two panels. 😊&lt;/p&gt;

&lt;p&gt;To create an other panel:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;php artisan make:filament-panel your-new-id-panel

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This command:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Generates a new Service Provider &lt;code&gt;app/Providers/Filament/MemberPanelProvider.php&lt;/code&gt; if your new id panel parameter is member.&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;If you plan to work with two or more panels, consider refactoring your default AdminPanelProvider to organize your code into subdirectories and segmented modules for better maintainability.&lt;br&gt;
&lt;/p&gt;
&lt;/blockquote&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;class AdminPanelProvider extends PanelProvider
{
    public function panel(Panel $panel): Panel
    {
        return $panel
            ...
            -&amp;gt;discoverResources(in: app_path('Filament/Admin/Resources'), for: 'App\\Filament\\Admin\\Resources')
            -&amp;gt;discoverPages(in: app_path('Filament/Admin/Pages'), for: 'App\\Filament\\Admin\\Pages')
            ..
            -&amp;gt;discoverWidgets(in: app_path('Filament/Admin/Widgets'), for: 'App\\Filament\\Admin\\Widgets')
            ...
    }
}

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  &lt;strong&gt;Step 3: Configure the &lt;code&gt;User&lt;/code&gt; model&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;To allow login access to the Filament panel, update the &lt;code&gt;User&lt;/code&gt; model as follows:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Open &lt;code&gt;app/Models/User.php&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Add the &lt;code&gt;FilamentUser&lt;/code&gt; interface and implement the &lt;code&gt;canAccessPanel&lt;/code&gt; method:
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;?php

namespace App\Models;

use Illuminate\Foundation\Auth\User as Authenticatable;
use Filament\Models\Contracts\FilamentUser;

class User extends Authenticatable implements FilamentUser
{
    public function canAccessPanel(): bool
    {
        return str_ends_with($this-&amp;gt;email, '@yourdomain.com');
    }
}

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This example restricts panel access to users with a specific email domain. You can update it with your own rules or simply have it return &lt;code&gt;true&lt;/code&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Step 4: Create an user&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Run the following command to create an admin user who can log in:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;php artisan make:filament-user

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You’ll be prompted to enter a name, email, and password. If you prefer not to be prompted, you can pass parameters directly in the command line:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;php artisan make:filament-user --name=name --email=email@domain.tdl --password=xxxxxxxxxx

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  &lt;strong&gt;Step 5: Access the panel&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;The setup is now complete. Start the Laravel server:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;php artisan serve

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Visit the panel in your browser at:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;http://localhost:8000/admin

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Log in using the credentials created in the previous step.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Next Steps: Customize and extend filament&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;With the panel running, you can:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Build CRUD resources&lt;/strong&gt; to manage your Laravel models.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Customize the UI&lt;/strong&gt; by modifying views and forms.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Install third-party plugins&lt;/strong&gt; for advanced features like role management and analytics.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Conclusion&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Filament PHP makes it easy to integrate a modern, functional admin panel into a Laravel application. With just a few commands, you’ll have a powerful tool ready for customization.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Don’t start from scratch!&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
My new &lt;strong&gt;Filament Backend Template&lt;/strong&gt; is the fastest way to start your next Laravel + Filament admin panel.&lt;br&gt;&lt;br&gt;
&lt;strong&gt;Pre-configured roles, permissions, Horizon, and more.&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
&lt;a href="https://filamentmastery.com/articles/laravel-filament-backend-starter-build-your-admin-panel-fast" rel="noopener noreferrer"&gt;&lt;strong&gt;Start building faster&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

</description>
      <category>filament</category>
      <category>laravel</category>
      <category>php</category>
      <category>webdev</category>
    </item>
  </channel>
</rss>
