Questions tagged [revisionable]
Revisionable is a Laravel package that allow you to keep revision history for models.
34
questions
5
votes
0
answers
115
views
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 (...
3
votes
1
answer
126
views
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 ...
3
votes
2
answers
1k
views
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 )
<li&...
1
vote
2
answers
900
views
Laravel VentureCraft revisionable not working on Laravel 5.5 when updating model
I used this package called revisionable so I tried to add it to my package.json and run the migration and everything worked fine.
But when I try to create a record and then update them it doesn't ...
0
votes
1
answer
294
views
How to load and display data from revisions table form VentureCraft/revisionable in Laravel 5.4?
My Route
Route::get('news-logs', 'Backend\ChangeLog\ChangeLogController@changeLogNews')->name('change-log-news');
My Model
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\...
1
vote
2
answers
498
views
Eager load related models in Laravel's Revisionable history
Using Laravel 5.4 and the VentureCraft/revisionable package.
I have 3 models: User, Company and Order.
The Order model implements the Revisionable trait:
namespace App\Models;
class Order extends ...
0
votes
1
answer
215
views
Laravel Revisionable - Tracking of "Form Input Array"
I'm currently using the Revisionable Package v1.28.0 for Laravel v5.4.23 which is a great couple for the most situations.
But now I got a little problem with the revisioning of input arrays. The ...
0
votes
1
answer
139
views
Laravel with Revisionable Package and catching errors
Using Laravel and Revisionable package. I am populating a table with user record modifications and have the following code snippet:
<tr>
<td width="150">{{ $revision->updated_at }}...
2
votes
2
answers
165
views
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-&...
0
votes
0
answers
323
views
Track changes of multiple rows as one revision in laravel
I want to track changes in laravel 5.3 using sofa/revisionable package (or any other package which performs same action)
Tables are as follows:
item
id - primary key
title - text
...
0
votes
1
answer
360
views
How to trigger a revision for a custom method from a Controller?
When using the RevisionableTrait, how can you trigger it to save a revision for a specific model, all this done from a Controller.
An user sends an email (this action doesn't CRUD any model), but I ...
0
votes
2
answers
199
views
How to change the table name for the revision table
How to change the table name for the revision table by default it is 'revisions';
But I want it to something like page_revisions cause there are many tables with different prefixes. So, I just need ...
2
votes
2
answers
443
views
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, ...
1
vote
2
answers
148
views
Laravel VentureCraft/revisionable error migration table
I have a problem with install VentureCraft/revisionable in Laravel.
When I trying use this command:
php artisan migrate --package=venturecraft/revisionable
Artisan returned error:
[Symfony\...
2
votes
1
answer
2k
views
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 ...
0
votes
2
answers
1k
views
How to use VentureCraft/revisionable in Laravel?
I want know how to use VentureCraft/revisionable in CRUD application and get a history
Ex : users every day need to add mileage and edit mileage ...... in my view (revision.blade.php) i want get ...
2
votes
0
answers
130
views
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/...
1
vote
1
answer
354
views
How to use Laravel revisionable with morphMaps?
I have a morphMap setup in my AppServiceProvider boot method that is firing when the Laravel revisionable package calls for the record so nothing is being returned. I am looking to figure out how to ...
0
votes
1
answer
225
views
revisionHistory is showing for some models but not others
I checked the revisions table in the database and their are revision records for the record I'm trying to show the history for.
$record->revisionHistory returns an empty array though.
The same code ...
2
votes
1
answer
7k
views
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 ...
1
vote
1
answer
409
views
How do I get just the most recent set of changes in the revisionable package?
Currently I have the revisionable trait correctly storing and fetching the history of a model goes through change.
Each update to a model creates a record per field that was changed.
Is it ...
0
votes
1
answer
362
views
Revisionable presenters not working
First I find a ticket.
$tick = App\Tickets::find(14);
Then I find a revision for the same:
$rev = $tick->latestRevision;
But it gives me a error:
App\Presenters\Revisions\Tickets #...
2
votes
2
answers
380
views
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 ...
0
votes
0
answers
115
views
Audit trail: return ids of columns with specific column value at a certain time
Using an audit trail in MySQL, how would you find records that had a specific value during a certain time frame?
Let's say I want to get the ids of users who were a site admin one week ago (role_id=1)...
7
votes
2
answers
2k
views
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 ...
5
votes
1
answer
470
views
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' ...
3
votes
1
answer
681
views
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) ...
0
votes
2
answers
998
views
How can I have my trait extend a class
I understand that by definition, a trait cannot extend a class, however I'm wondering if there's some kind of workaround.
My situation:
I created the package revisionable, which in its first ...
2
votes
2
answers
1k
views
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
...
1
vote
1
answer
2k
views
Keeping revision history using VentureCraft/revisionable
I have to display history of changes that are made in my app (like update, insert->who did it , what field changed and when). I am using laravel 4 and I also downloaded this. But the problem is that I ...
1
vote
2
answers
2k
views
Laravel 4 Versionable Package error: Class 'MyApp\Models\Eloquent' not found
I'm trying to use the Versionable Package in my Laravel 4 app based on the new, trait based implementation like this
<?php
use Illuminate\Auth\UserInterface;
use Illuminate\Auth\Reminders\...
2
votes
1
answer
2k
views
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('...
1
vote
3
answers
23k
views
Extending Multiple Classes In Laravel
I am stuck as Php natively does not allow extending multiple classes, i am using laravel models to interact with data and want to use 2 different packages to extend it's functionality.
I am trying to ...
5
votes
3
answers
7k
views
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 structure:
+-----------+-----...