PHPackages                             oneseven9955/laravel-auditing-filesystem - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Database &amp; ORM](/categories/database)
4. /
5. oneseven9955/laravel-auditing-filesystem

ActivePackage[Database &amp; ORM](/categories/database)

oneseven9955/laravel-auditing-filesystem
========================================

This filesystem driver, designed for the owen-it/laravel-auditing package, facilitates storing audits in CSV files across all Laravel disks that are registered.

0.1.0(1y ago)061MITPHPPHP ^8.1

Since Jun 7Pushed 1y ago1 watchersCompare

[ Source](https://github.com/179955/laravel-auditing-fs)[ Packagist](https://packagist.org/packages/oneseven9955/laravel-auditing-filesystem)[ RSS](/packages/oneseven9955-laravel-auditing-filesystem/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (1)Dependencies (4)Versions (2)Used By (0)

This driver provides the functionality to save your model audit records as lines in CSV files. It is seamlessly integrated with Laravel Storage System, enabling you to use any of the registered disks specified in your application as storage destinations for the audit files.

Additionally, the driver offers flexibility in how the audit files are generated, allowing you to choose between creating a single comprehensive file or generating files for each hour of operation. Moreover, the driver can potentially improve performance by buffering the log records and then flushing them once you have completed making model changes.

### Installation

[](#installation)

To utilize this driver, you need to have `owen-it/laravel-auditing: ^13.0` installed. Once this requirement is met, you can proceed to install the driver as follows:

```
composer require OneSeven9955/laravel-auditing-fs

```

### Setup

[](#setup)

If you wish to modify the default behavior of the driver, you must include the following configuration entries in `config/audit.php`. The drivers key in the configuration file should be structured as follows:

```
    // ...
    'drivers' => [
        'database' => [
            'table'      => 'audits',
            'connection' => null,
        ],
        'filesystem' => [
            'disk'      => 'local',     // The registered name of any filesystem disk in the application
            'dir'       => 'audit',     // The directory on the disk where the audit csv files will be saved
            'filename'  => 'audit.csv', // The filename of the audit file
            'rotation'  => 'single',    // One of 'single', 'daily', or 'hourly'
        ],
    ],
    // ...
```

### Usage

[](#usage)

You can integrate the driver into any Auditable model by following the code snippet below:

```
