1. Go to this page and download the library: Download mblsolutions/audit-logging 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/ */
use Illuminate\Routing\Route;
Route::get('/user', function () {
//
})->middleware('web-audit-logging');
use Illuminate\Routing\Route;
use MBLSolutions\AuditLogging\Http\Middleware\AuditLogging;
Route::get('/user', function () {
//
})->middleware(AuditLogging::class);
use Illuminate\Routing\Route;
Route::middleware(['web-audit-logging'])->group(function () {
Route::get('/', function () {
//
});
Route::get('/user', function () {
//
});
});
use Illuminate\Routing\Route;
Route::middleware(['api-audit-logging'])->group(function () {
Route::get('/', function () {
//
})->withoutMiddleware(['api-audit-logging']);
Route::get('/user', function () {
//
});
});
$config = config('audit-logging.drivers.database');
$auditLog = new MBLSolutions\AuditLogging\Models\AuditLog;
$auditLog->setConnection($config['connection']);
$auditLog->setTable($config['table']);