PHP code example of vlotysh / filament-docs

1. Go to this page and download the library: Download vlotysh/filament-docs 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/ */

    

vlotysh / filament-docs example snippets


// app/Providers/Filament/AdminPanelProvider.php

use Vlotysh\FilamentDocs\FilamentDocsPlugin;

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

return [
    // Visibility: 'public', 'admin', or 'password'
    'default_visibility' => env('DOCS_VISIBILITY', 'admin'),

    // Route prefixes
    'route_prefix' => 'docs',
    'api_prefix' => 'api/docs',

    // Middleware
    'admin_middleware' => ['web', 'auth', 'admin'],
    'public_middleware' => ['web'],

    // Features
    'features' => [
        'search' => true,
        'export' => true,
        'wiki_links' => true,
    ],

    // Media storage disk
    'media_disk' => env('DOCS_MEDIA_DISK', 'public'),

    // Custom admin check (optional)
    'admin_check' => null, // fn($user) => $user->hasRole('admin'),
];
bash
php artisan vendor:publish --tag=filament-docs-config
php artisan vendor:publish --tag=filament-docs-migrations
php artisan migrate
bash
composer