Questions tagged [revisionable]

Revisionable is a Laravel package that allow you to keep revision history for models.

Sometimes it is great being able to track changes within Models, with Laravel Revisionable this has now become a simple process.

You can find their repo on Github along with their Documentation

35 questions
8
votes
2 answers

Laravel revisionable models with one-to-many relationship

Is it possible for revisionable to track changes to one-to-many relationships? For example: Model: User. Model: Posts. User model uses Venturecraft\Revisionable\RevisionableTrait; and have a hasMany relationship to Posts. If a post is added or…
5
votes
0 answers

Explicitly providing "user_id" to Revisionable

My company uses a 3 tiered system for our web application: Front end - client layer Middle layer (composes requests, provides validation and authentication) - accessible by the front end Backend (where all the database requests are made) - not…
commadelimited
  • 5,656
  • 6
  • 41
  • 77
5
votes
1 answer

Getting model "identifiableName()" from revisionable

In the revisionable package it's possible to get the identifiable name of a related model by defining the identifiableName() method on a model, setting the field to display instead of id. E.g. 'name' or 'title'. Is it possible to do similar with…
harryg
  • 23,311
  • 45
  • 125
  • 198
5
votes
3 answers

How can I implement model revisions in Laravel?

This question is for my pastebin app written in PHP. I did a bit of a research, although I wasn't able to find a solution that matches my needs. I have a table with this…
Sayak Banerjee
  • 1,954
  • 3
  • 25
  • 58
3
votes
1 answer

Is there any way to get a specific version of a model in laravel backpack-crud?

I'm using VentureCraft/revisionable for laravel-backpack-curd, I know it helps me to manage a model's change history, but I want to switch to a specific version of a model and get it completely as a model. is there any way to do this? Let me explain…
Meysam Zarei
  • 419
  • 2
  • 14
3
votes
2 answers

Laravel revisionable getting a list of all revisions by specific user

I'm using the VentureCraft/revisionable-package and it shows me in the ReadMe how to show the Revisions of a Model that has revisions: @foreach($account->revisionHistory as $history )
  • {{ $history->userResponsible()->first_name }}…
  • user1469734
    • 851
    • 14
    • 50
    • 81
    3
    votes
    1 answer

    Laravel log revisions for many-to-many relationships

    I'm a completely new Laravel developer and I'm using the VentureCraft Revisionable library to record model revisions. I need to record revisions for a many-to-many model and it's my understanding that Revisionable does not support this. I've…
    brianfr82
    • 271
    • 1
    • 5
    • 19
    3
    votes
    1 answer

    Using `boot()` on a model conflicts with RevisionableTrait

    I'm using the Revisionable package in my laravel app to log edits to a model. In addition I have also implemented an observer class to listen for specific model events (update, delete, create etc) and perform actions (such as clear caches etc). This…
    harryg
    • 23,311
    • 45
    • 125
    • 198
    2
    votes
    2 answers

    Obtaining field from table using primary key

    Using Laravel and Revisionable Package for tracking changes. In my view I'm populating my table: @foreach($revisions as $revision) @if($revision->key == 'created_at' && !$revision->old_value) {{…
    SGlavach
    • 25
    • 2
    2
    votes
    2 answers

    Laravel VentureCraft/revisionable returned name record with databse

    Hello in my project I using VentureCraft/revisionable https://github.com/VentureCraft/revisionable This is addition to recording the history of changes to records in databse. Everything works fine, but when I returned the history on page, the script…
    major697
    • 139
    • 1
    • 2
    • 15
    2
    votes
    0 answers

    Laravel namespace confusion

    I am trying to use this package: https://github.com/VentureCraft/revisionable But I get: Fatal error: Class 'Auth' not found in /var/www/html/selection/vendor/venturecraft/revisionable/src/Venturecraft/Revisionable/RevisionableTrait.php and the…
    Mick
    • 1,401
    • 4
    • 23
    • 40
    2
    votes
    1 answer

    Laravel 5 Dynamically create Eloquent Models

    Suppose I have an of mysql table names and a row id: ['table_name' => 'things', 'row_id' => 11], ['table_name' => 'stuff', 'row_id' => 5] Each of these tables has an Eloquent model referencing the table. How can I iterate the list and dynamically…
    Jared Eitnier
    • 7,012
    • 12
    • 68
    • 123
    2
    votes
    2 answers

    Foreign value relations to store in revisionable

    I am using VentureCraft/revisionable in my Laravel project. I wanted to work on multiple models at once, but since revisionable doesn't allow me to do so, I did that in single models. There was this one instance, where I got this revisionable…
    nirvair
    • 4,001
    • 10
    • 51
    • 85
    2
    votes
    2 answers

    Trait 'Venturecraft\Revisionable\RevisionableTrait' not found

    I am using laravel 4 and I want to keep track of history of all transactions made to a table. I followed those steps added "venturecraft/revisionable": "1.*" at composer.json php composer.phar update run in the root of my project this : php artisan…
    user3622939
    2
    votes
    1 answer

    Laravel Query Builder use variables in MySQL for complex select?

    How to do this with one mysql request: $revision = $this->Revision->where('batch', $batch)->first(); $revisions = $this->Revision->where('batch','>', $batch) ->where('revisionable_type', $revision->revisionable_type) ->where('revisionable_id',…
    Hontoni
    • 1,332
    • 1
    • 16
    • 27
    1
    2 3