PHP code example of asmit / filament-upload

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

    

asmit / filament-upload example snippets


use Asmit\FilamentUpload\Forms\Components\AdvancedFileUpload;

public static function form(Form $form): Form
{
    return $form
        ->schema([
            AdvancedFileUpload::make('file')
                ->label('Upload PDF')
                ->pdfPreviewHeight(400) // Customize preview height
                ->pdfDisplayPage(1) // Set default page
                ->pdfToolbar(true) // Enable toolbar
                ->pdfZoomLevel(100) // Set zoom level
                ->pdfFitType(PdfViewFit::FIT) // Set fit type
                ->pdfNavPanes(true) // Enable navigation panes
        ]);
}
bash
php artisan filament:assets