Skip to content

Commit

Permalink
Merge pull request #1 from achillesp/analysis-zYOo30
Browse files Browse the repository at this point in the history
Applied fixes from StyleCI
  • Loading branch information
achillesp committed May 22, 2016
2 parents 73daab3 + 7331a65 commit b272000
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php

use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;

class AddFieldsToLogTable extends Migration
{
Expand Down
18 changes: 9 additions & 9 deletions src/AuditingTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -238,16 +238,16 @@ public function auditDeletion()
public function audit(array $log, $type)
{
$logAuditing = [
'old_value' => json_encode($log['old_value']),
'new_value' => json_encode($log['new_value']),
'owner_type' => get_class($this),
'owner_id' => $this->getKey(),
'user_id' => $this->getUserId(),
'type' => $type,
'old_value' => json_encode($log['old_value']),
'new_value' => json_encode($log['new_value']),
'owner_type' => get_class($this),
'owner_id' => $this->getKey(),
'user_id' => $this->getUserId(),
'type' => $type,
'route' => \Request::route()->getName() ? \Request::route()->getName() : \Request::route()->getUri(),
'ip' => \Request::ip(),
'created_at' => new \DateTime(),
'updated_at' => new \DateTime(),
'ip' => \Request::ip(),
'created_at' => new \DateTime(),
'updated_at' => new \DateTime(),
];

return Log::insert($logAuditing);
Expand Down

0 comments on commit b272000

Please sign in to comment.