owen-it / laravel-auditing-doc

Laravel Auditing Documentation
http://laravel-auditing.com
56 stars 62 forks source link

How to get the audit of all model records? #78

Closed neoacevedo closed 4 years ago

neoacevedo commented 4 years ago

Good, as the title: How to get the audit of all model records? For instance, in venturecraft/revisionable I can do in the model (using a trait):

public static function revisions()
{
    return \Venturecraft\Revisionable\Revision::where('revisionable_type', get_class());
}

And getting the audit records:

$revisions = User::revision()->paginate(10);  

And it will return me every audit records for the User model, but checking your documentation I have to call only one record of the model to get the audit records.

How could I to achieve some similar to the code above?

neoacevedo commented 4 years ago

Sorry, wrong repo.