2017 © Pedro Peláez
 

library super-scan

Simple File Change Detection for Laravel

image

joshwhatk/super-scan

Simple File Change Detection for Laravel

  • Monday, July 31, 2017
  • by joshwhatk
  • Repository
  • 1 Watchers
  • 1 Stars
  • 11 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 1 Open issues
  • 10 Versions
  • 0 % Grown

The README.md

Super-scan

Detect changed files using PHP/MySQL/CRON, (*1)

Introduction

This set of scripts is an evolution from what David K. Lynn offered as a SitePoint article and then through suggestions from Han Wechgelaer., (*2)

For the original code and readme, you can check the repository for which this is a fork: SuperScan. Although based on the same original code, this repository is now very different from David K. Lynn's version, so I have removed his readme as well., (*3)

Super-scan is a package built for Laravel that allows simple File change detection and reporting., (*4)

Installation

Register the SuperScanServiceProvider in your config/app.php:, (*5)

JoshWhatK\SuperScan\SuperScanServiceProvider::class,

Publish the config file and migrations:, (*6)

php artisan vendor:publish --provider="JoshWhatK\SuperScan\SuperScanServiceProvider"

Change the default Account(s) as you wish:, (*7)

Example, (*8)

'account' => [

    /*
    |--------------------------------------------------------------------------
    | Default Account
    |--------------------------------------------------------------------------
    |
    | This account information is saved to the database during the super-scan
    | migrations. If you are not using the default
    | JoshWhatK\SuperScan\Database\Account model, then this can be removed.
    |
    */

    'defauts' => [
        [
            'name' => 'Base Account',
            'server_name' => 'hostname',
            'ip_address' => '127.0.0.1',
            'scan_directory' => '/var/www/html'
            'public_url' => 'https://www.example.com',
            'excluded_directories' => [
                'logs',
            ],
        ],
    ],
],

If you would like to use your own Account model, just make sure that it implements JoshWhatK\SuperScan\Contracts\AccountInterface., (*9)

Now you can set up the Scan to run as a Laravel task in app/Console/Kernel.php., (*10)

$schedule->call(function () {
    try {
        Scan::run(Account::first(), new Report);
    } catch (\Exception $e) {
    }
})->everyMinute();

Now you can test it using:, (*11)

php artisan schedule:run

The Versions

31/07 2017

dev-upgrade-to-laravel-5.3

dev-upgrade-to-laravel-5.3

Simple File Change Detection for Laravel

  Sources   Download

MIT

The Requires

 

The Development Requires

11/01 2016

v0.0.1

0.0.1.0

Simple File Change Manager

  Sources   Download

MIT

The Requires

 

The Development Requires