PHP code example of filamentboot / filamentboot-site

1. Go to this page and download the library: Download filamentboot/filamentboot-site library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

filamentboot / filamentboot-site example snippets


use Filamentboot\FilamentbootSite\SitePlugin;

public function panel(Panel $panel): Panel
{
    return $panel
        // ...
        ->plugins([
            SitePlugin::make(),
        ]);
}

return [
    'label'     => '科技装修(浅色)',
    'templates' => ['default', 'landing'],   // pages/templates/{key}.blade.php
    'blocks'    => ['hero', 'cta', 'faq'],   // blocks/{key}.blade.php
    'features'  => ['nested_menu' => true],  // 桌面导航有下拉版式
];

// config/filamentboot-site.php
'gated' => [
    'disk'     => env('SITE_GATED_DISK', 'local'),   // ⚠️ 必须是非公开磁盘
    'link_ttl' => env('SITE_GATED_LINK_TTL', 30),    // 链接有效分钟数
],
bash
php artisan filamentboot-site:install --with-demo
bash
php artisan filamentboot-site:doctor
bash
php artisan vendor:publish --tag=filamentboot-site-config
php artisan vendor:publish --tag=filamentboot-site-assets
php artisan migrate

php artisan db:seed --class="Filamentboot\FilamentbootSite\Database\Seeders\SitePermissionSeeder"
php artisan db:seed --class="Filamentboot\FilamentbootSite\Database\Seeders\SiteRoleSeeder"
php artisan db:seed --class="Filamentboot\FilamentbootSite\Database\Seeders\SiteMenuSeeder"
bash
# 案例 / 方案 / 产品 / 静态页面 / 示例询盘
php artisan db:seed --class="Filamentboot\FilamentbootSite\Database\Seeders\SiteDemoSeeder"

# 资讯分类与文章
php artisan db:seed --class="Filamentboot\FilamentbootSite\Database\Seeders\SiteNewsSeeder"
bash
php artisan vendor:publish --tag=filamentboot-site-views
bash
php artisan filamentboot-site:push-baidu          # 试运行,只报条数
php artisan filamentboot-site:push-baidu --all    # 真正推送
bash
php artisan filamentboot-site:crawler-stats --log=/var/log/nginx/access.log
php artisan filamentboot-site:crawler-stats --since=2026-08-01 --paths