hamaelt/virus-scanner-laravel

There is no license information available for the latest version (dev-main) of this package.

dev-main 2022-07-19 15:52 UTC

This package is not auto-updated.

Last update: 2024-09-26 23:06:53 UTC


README

A validation rule for validating MIME type of zip files for Laravel to validate that the zip file only contains the allowed file types.

Requirement

  • PHP 8+
  • PHP Extension socket
  • Laravel 8+

Installation

composer require hamaelt/virus-scanner

Publish config files

php artisan vendor:publish --provider="Hamaelt\VirusScanner\Providers\ServiceProvider"

The service provider will automatically be registered. However , you can manually add the service provider to your app/config.php file

  'providers' => [
      //...
      "Hamaelt\VirusScanner\Providers\ServiceProvider::class"
  ];

Implementation

Dependency inject the class VirusScanner.php
$virusScanner->isVirus('filepath');