Package Data | |
---|---|
Maintainer Username: | joshwhatk |
Maintainer Contact: | joshwhatk@gmail.com (Josh Friend) |
Package Create Date: | 2016-04-27 |
Package Last Update: | 2017-07-31 |
Home Page: | |
Language: | PHP |
License: | MIT |
Last Refreshed: | 2025-02-20 15:01:04 |
Package Statistics | |
---|---|
Total Downloads: | 125 |
Monthly Downloads: | 0 |
Daily Downloads: | 0 |
Total Stars: | 1 |
Total Watchers: | 2 |
Total Forks: | 1 |
Total Open Issues: | 1 |
Detect changed files using PHP/MySQL/CRON
This set of scripts is an evolution from what David K. Lynn offered as a SitePoint article and then through suggestions from Han Wechgelaer.
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.
Super-scan is a package built for Laravel that allows simple File change detection and reporting.
Register the SuperScanServiceProvider in your config/app.php
:
JoshWhatK\SuperScan\SuperScanServiceProvider::class,
Publish the config file and migrations:
php artisan vendor:publish --provider="JoshWhatK\SuperScan\SuperScanServiceProvider"
Change the default Account(s) as you wish:
Example
'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
.
Now you can set up the Scan
to run as a Laravel task in app/Console/Kernel.php
.
$schedule->call(function () {
try {
Scan::run(Account::first(), new Report);
} catch (\Exception $e) {
}
})->everyMinute();
Now you can test it using:
php artisan schedule:run