composer.json
{ "require": { "php": "^7.3", // "venturecraft/revisionable": "1.*" }}
{ "require": { "php": "^7.3", // "venturecraft/revisionable": "1.*" }}
use Illuminate\Database\Eloquent\Model;use Venturecraft\Revisionable\RevisionableTrait; class Comment extends Model{ use RevisionableTrait; protected $keepRevisionOf = ['body'];}
@foreach($comment->revisionHistory as $history )<p class="history"> {{ $history->created_at->diffForHumans() }}, {{ $history->userResponsible()->name }} {{trans('messages.changed')}} <strong>{{ $history->fieldName() }}</strong> {{trans('messages.changed_from')}} <code>{{ $history->oldValue() }}</code> {{trans('messages.changed_to')}} <code>{{ $history->newValue() }}</code></p>@endforeach