PHP code example of bostjanob / filament-file-manager

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

    

bostjanob / filament-file-manager example snippets




namespace App\Filament\Pages;

use BostjanOb\FilamentFileManager\Pages\FileManager;

class PublicFileManager extends FileManager
{
    protected static ?string $navigationLabel = 'Public files';
    
    protected string $disk = 'public';
}

public function table(Table $table): Table
{
    $table = parent::table($table);

    // actions names: open, download, delete
    $table->getAction('delete')->hidden(true);

    return $table;
}

public function table(Table $table): Table
{
    $table = parent::table($table);

    $table->pushActions([
        Action::make('john')
            ->label('John'),
    ]);

    return $table;
}