From 2496f8cf89cdf7754d8af2c3775eada51b201ac1 Mon Sep 17 00:00:00 2001 From: noogen Date: Fri, 10 Jun 2022 23:56:04 -0500 Subject: [PATCH] remove cloudauditable --- config/laratt.php | 2 -- phpunit.xml.dist | 3 ++- src/Models/ProfileModel.php | 4 ++-- src/Models/TableModel.php | 4 ++-- src/Traits/AuditableTrait.php | 5 ----- 5 files changed, 6 insertions(+), 12 deletions(-) diff --git a/config/laratt.php b/config/laratt.php index ee57759..0004d00 100644 --- a/config/laratt.php +++ b/config/laratt.php @@ -6,8 +6,6 @@ 'exts' => 'xlsx,ods,csv', ], 'audit' => [ - 'disk' => env('AUDIT_DISK', 's3'), - 'bucket' => env('AUDIT_BUCKET'), 'include' => [ 'table' => '.*', 'tenant' => '.*', diff --git a/phpunit.xml.dist b/phpunit.xml.dist index dc76017..6da7d17 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -5,10 +5,11 @@ src/ + src/AuditableEvent.php src/LarattServiceProvider.php src/LarattException.php src/RequestQueryBuilder.php - src/Traits/CloudAuditable.php + src/Traits/AuditableTrait.php diff --git a/src/Models/ProfileModel.php b/src/Models/ProfileModel.php index ac8e68d..335fd55 100644 --- a/src/Models/ProfileModel.php +++ b/src/Models/ProfileModel.php @@ -7,12 +7,12 @@ use Illuminate\Foundation\Auth\User as Authenticatable; use Illuminate\Support\Facades\Schema; use Illuminate\Support\Str; -use Niiknow\Laratt\Traits\CloudAuditable; +use Niiknow\Laratt\Traits\AuditableTrait; use Niiknow\Laratt\Traits\TableModelTrait; class ProfileModel extends Authenticatable { - use CloudAuditable, + use AuditableTrait, TableModelTrait; /** diff --git a/src/Models/TableModel.php b/src/Models/TableModel.php index f309c19..6a934a4 100644 --- a/src/Models/TableModel.php +++ b/src/Models/TableModel.php @@ -6,13 +6,13 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; use Illuminate\Support\Str; -use Niiknow\Laratt\Traits\CloudAuditable; +use Niiknow\Laratt\Traits\AuditableTrait; use Niiknow\Laratt\Traits\SchedulableTrait; use Niiknow\Laratt\Traits\TableModelTrait; class TableModel extends Model { - use CloudAuditable, + use AuditableTrait, SchedulableTrait, TableModelTrait; diff --git a/src/Traits/AuditableTrait.php b/src/Traits/AuditableTrait.php index 91c45b1..04b783f 100644 --- a/src/Traits/AuditableTrait.php +++ b/src/Traits/AuditableTrait.php @@ -55,11 +55,6 @@ public function canAudit() return false; } - $disk = config('laratt.audit.disk'); - if (empty($disk)) { - return false; - } - $iten = config('laratt.audit.include.tenant'); $itab = config('laratt.audit.include.table'); if (empty($iten) || empty($itab)) {