PHP code example of johnrivera7 / filament-antivirus
1. Go to this page and download the library: Download johnrivera7/filament-antivirus 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/ */
johnrivera7 / filament-antivirus example snippets
use JohnRivera7\FilamentAntivirus\FilamentAntivirusPlugin;
public function panel(Panel $panel): Panel
{
return $panel
->plugins([
FilamentAntivirusPlugin::make()
->navigationGroup('Configuraciones')
->navigationLabel('Antivirus')
->navigationSort(7)
->permission(fn (): bool => auth()->user()?->hasAnyRole(['super_admin', 'admin']) ?? false),
]);
}
use JohnRivera7\FilamentAntivirus\Rules\AntivirusFileRule;
FileUpload::make('document')
->rules([new AntivirusFileRule()]);