Looking to hire Laravel developers? Try LaraJobs

virus-scanner-laravel maintained by hamaelt

Author
Last update
2022/07/19 17:52 (dev-main)
Links
Downloads
0

Comments
comments powered by Disqus

Virus Scanner

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');