revisionable | Easily create a revision history for any laravel model

 by   VentureCraft PHP Version: 1.40.0 License: MIT

kandi X-RAY | revisionable Summary

kandi X-RAY | revisionable Summary

revisionable is a PHP library. revisionable has no vulnerabilities, it has a Permissive License and it has medium support. However revisionable has 1 bugs. You can download it from GitHub.

Wouldn't it be nice to have a revision history for any model in your project, without having to do any work for it. By simply adding the RevisionableTrait Trait to your model, you can instantly have just that, and be able to display a history similar to this:. So not only can you see a history of what happened, but who did what, so there's accountability. Revisionable is a laravel package that allows you to keep a revision history for your models without thinking. For some background and info, see this article.
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              revisionable has a medium active ecosystem.
              It has 2429 star(s) with 351 fork(s). There are 67 watchers for this library.
              OutlinedDot
              It had no major release in the last 12 months.
              There are 97 open issues and 127 have been closed. On average issues are closed in 238 days. There are 21 open pull requests and 0 closed requests.
              It has a neutral sentiment in the developer community.
              The latest version of revisionable is 1.40.0

            kandi-Quality Quality

              revisionable has 1 bugs (0 blocker, 0 critical, 1 major, 0 minor) and 17 code smells.

            kandi-Security Security

              revisionable has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
              revisionable code analysis shows 0 unresolved vulnerabilities.
              There are 0 security hotspots that need review.

            kandi-License License

              revisionable is licensed under the MIT License. This license is Permissive.
              Permissive licenses have the least restrictions, and you can use them in most projects.

            kandi-Reuse Reuse

              revisionable releases are available to install and integrate.
              Installation instructions, examples and code snippets are available.
              revisionable saves you 335 person hours of effort in developing the same functionality from scratch.
              It has 804 lines of code, 72 functions and 10 files.
              It has high code complexity. Code complexity directly impacts maintainability of the code.

            Top functions reviewed by kandi - BETA

            kandi has reviewed revisionable and discovered the below as its top functions. This is intended to give you an instant insight into revisionable implemented functionality, and help decide if they suit your requirements.
            • Get the revisionable value
            • Post create action .
            • Do the beforeSave event .
            • Post save callback .
            • Get the user responsible for the specified user .
            • Boot the revisionable trait .
            • Format options .
            • Run the migrations .
            • Returns a boolean value
            • Migrate revisions .
            Get all kandi verified functions for this library.

            revisionable Key Features

            No Key Features are available at this moment for revisionable.

            revisionable Examples and Code Snippets

            No Code Snippets are available at this moment for revisionable.

            Community Discussions

            QUESTION

            Laravel - destroy then update deleted_by
            Asked 2020-Mar-30 at 03:59

            I'm having an error when after using destroy I need to update my deleted_by field. I heard about revisionable but I'm trying to stay as simple as possible with my application. Is it even possible to throw another function inside a destroy?

            ...

            ANSWER

            Answered 2020-Mar-30 at 03:34

            You can use route model binding and do it like this:

            Source https://stackoverflow.com/questions/60923555

            QUESTION

            How do I eager-load nested relationships and go through the collection in nested foreach loops?
            Asked 2019-Aug-19 at 18:33

            I am trying to eager-load a collection multiple levels deep and then go through that collection and let it forget parts of it.

            My problem is that the foreach loops here just do not trigger at all and dd() on certain levels just gives me a relationship instead of collection elements.

            I also know that my approach is probably not the best of doing something like this. I would be happy to learn a better way :)

            So what I have is data similar to the following:

            ...

            ANSWER

            Answered 2019-Aug-19 at 18:33

            I cannot review all the logic, but for sure problem might be with because of using getChildrenAttribute. You should never create accessor/mutator with the same name as relationship because if you write:

            Source https://stackoverflow.com/questions/57561695

            QUESTION

            Laravel revisionable getting a list of all revisions by specific user
            Asked 2018-Sep-21 at 15:22

            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:

            ...

            ANSWER

            Answered 2018-Sep-21 at 15:22

            I have never used this package. But based on what I see, you should be able to add this in your User model

            Source https://stackoverflow.com/questions/52386277

            QUESTION

            Eager load related models in Laravel's Revisionable history
            Asked 2017-Sep-27 at 19:53

            Using Laravel 5.4 and the VentureCraft/revisionable package.

            I have 3 models: User, Company and Order.

            The Order model implements the Revisionable trait:

            ...

            ANSWER

            Answered 2017-Sep-27 at 15:27

            You can use $company = $revision->userResponsible()->company to get company of the User that change the Order.

            Source https://stackoverflow.com/questions/46434419

            QUESTION

            Laravel 5 exception "The Symfony\Component\Process\ProcessUtils::escapeArgument() is deprecated"
            Asked 2017-Jun-16 at 22:52

            I get everytime ErrorException when I want to execute any command using artisan, phpunit.

            How can I fix it?

            ...

            ANSWER

            Answered 2017-Jun-05 at 11:40

            Did you run composer update in your project folder?

            Source https://stackoverflow.com/questions/44367602

            QUESTION

            Composer won't install package dependencies
            Asked 2017-Jun-02 at 13:17

            I have created composer package, which composer.json is

            ...

            ANSWER

            Answered 2017-Jun-02 at 13:17

            Don't use the package repository type. When you use this, you have to copy all information that usually resides inside the composer.json file of the software you are referencing.

            package repositories are for scenarios where you are unable to add a composer.json file to the origin of the software. You have full control over your package, so this does not apply.

            Just add a repository link of type vcs with the URL to the repository, and Composer will figure out the rest by looking at the composer.json file inside the repository. It will detect the dependencies and install them.

            Source https://stackoverflow.com/questions/44265485

            QUESTION

            is laravel 5.4 running migrations from vendor folders now?
            Asked 2017-Mar-14 at 15:45

            I have installed some packages that have migrations in their vendor folders, previously one of the packages I used published these migrations to migrations folder by running:

            php artisan vendor:publish

            Now I found alteast 2 packages that no longer published migrations when running this command, so I went into vendor folder and grabbed migration file and manually moved it and when I run

            composer dump-autoload I got a warrning message from it that said: Warning:

            Ambiguous class resolution, "CreateRevisionsTable" was found in both "$baseDir . '/database/migrations/2013_04_09_062329_create_revisions_table.php" and "C:\xampp\htdocs\example\vendor/venturecraft/revisionable/src/migrations\2013_04_09_062329_create_revisions_table.php", the first will be used.

            why is this happening? Has something changed in 5.4?

            ...

            ANSWER

            Answered 2017-Mar-14 at 15:45

            Yes, since version 5.4 Laravel supports loading migrations from any directory.

            Source https://stackoverflow.com/questions/42790431

            QUESTION

            Laravel with Revisionable Package and catching errors
            Asked 2017-Jan-03 at 00:38

            Using Laravel and Revisionable package. I am populating a table with user record modifications and have the following code snippet:

            ...

            ANSWER

            Answered 2017-Jan-03 at 00:38

            Blade has the orsyntax, really nice:

            Source https://stackoverflow.com/questions/41434910

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install revisionable

            Revisionable is installable via composer, the details are on packagist, here.

            Support

            Contributions are encouraged and welcome; to keep things organised, all bugs and requests should be opened in the GitHub issues tab for the main project, at venturecraft/revisionable/issues. All pull requests should be made to the develop branch, so they can be tested before being merged into the master branch.
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries