Some projects require dynamic controls for their homepage. You might want to show/hide page sections or change the number of records seen dynamically. This example shows you how to do that.
Get the Source Code:
Only This Example
$9
One-time payment
Full source code for Filament Custom Homepage with Dynamic Sections
Downloadable ZIP file with the source code
Lifetime access to this example
Sign in with GitHub to buy
Sign in first, then complete your $9 checkout.
Best value — all 178 examples
View membership plans
FilamentExamples Membership
$99
/year
or
$199
lifetime
Access to code of all 178 examples
Future new examples and updates included
FilaCheck Pro package licence included
MCP server included
30-day money-back guarantee
How it works
All the management is in the HomepageSectionResource Filament resource
app/Filament/Resources/HomepageSectionResource.php:
public static function form(Form $form): Form{ return $form ->schema([ Forms\Components\TextInput::make('name') ->required(), // ... Forms\Components\Select::make('type') ->required() ->options([ 'popular' => 'Popular Recipes', 'latest' => 'Latest Recipes', 'category' => 'Category Based', ]) ->live(), // Conditionally show category selection for category-based sections Forms\Components\Select::make('category_slug') ->label('Category') ->options(fn () => Category::pluck('name', 'slug')) ->visible(fn (Forms\Get $get) => $get('type') === 'category'), // ... Forms\Components\Toggle::make('visible') ->label('Show on Homepage') ->default(true), ]);}
Next, we will implement:
- Custom Homepage
- Custom List retrieved from the Homepage Section Resource
The FULL tutorial is available after the purchase: in the Readme file of the official
repository you would get invited to.