PHPackages                             kyagie/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. [Utility &amp; Helpers](/categories/utility)
4. /
5. kyagie/laravel-auditing-filesystem

ActivePackage[Utility &amp; Helpers](/categories/utility)

kyagie/laravel-auditing-filesystem
==================================

A filesystem driver for the owen-it/laravel-auditing package. Allows storage of the audits in CSV files, across all registered Laravel disks.

v1.0.1(11mo ago)04MITPHPPHP ^8.3

Since Oct 7Pushed 11mo agoCompare

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

READMEChangelog (2)Dependencies (8)Versions (3)Used By (0)

Laravel Auditing Filesystem Driver
==================================

[](#laravel-auditing-filesystem-driver)

This is a fork of the [betapeak/laravel-auditing-filesystem](https://github.com/betapeak/laravel-auditing-filesystem) package. The original package was not maintained and had some issues with the latest version of Laravel. This fork aims to fix those issues and add some new features.

This driver provides the ability to save your model audits in CSV files. It's integrated with Laravel's Storage system so you can use any of the disks specified in your application as the storage destinations of the audit files.

We also recognize that many systems generate a substantial amount of audit actions and that's why the package allows to specify how the audit files are generated - from a flat catch-all file to files generated for each hour of operation.

Installation
------------

[](#installation)

This driver requires that you are using `owen-it/laravel-auditing`. Provided this is fulfilled, you can install the driver like so:

```
composer require kyagie/laravel-auditing-filesystem
```

Setup
-----

[](#setup)

You need to add the following config entries in config/audit.php if you need to change the default behaviour of the driver. The `drivers` key of the config file should look like so:

```
    ...
    'drivers' => [
        'database' => [
            'table'      => 'audits',
            'connection' => null,
        ],
        'filesystem' => [
            'disk'         => 'local',
            'dir'          => 'audit',
            'filename'     => 'audit.csv',
            'logging_type' => 'single',
        ],
    ],
    ...
```

For simplicity, there are just 4 settings you can adjust and they're described below:

ParameterTypeDescriptiondisk(string)The name of any filesystem disk in the app. Usage of remote disks (AWS, Rackspace, etc) is discouraged, as it introduces substantial additional http request overheads to the remote diskdir(string)The directory on the disk where the audit csv files will be savedfilename(string)The filename of the audit file. If logging\_type is different from 'single', this filename is ignored as it's being dynamically generatedlogging\_type(string)Defines how the audit files are being generated. One of 'single', 'daily' or 'hourly'.Usage
-----

[](#usage)

You can use the driver in any Auditable model (locally) like so:

```
