Download the PHP package hanifhefaz/user-model-activity without Composer
On this page you can find all versions of the php package hanifhefaz/user-model-activity. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download hanifhefaz/user-model-activity
More information about hanifhefaz/user-model-activity
Files in hanifhefaz/user-model-activity
Package user-model-activity
Short Description Log activities over models into a log file.
License MIT
Informations about the package user-model-activity
User Model Activity
- Introduction
- Installation
- Usage
- Conclusion
- Contributors
- Known Issues and future plans
Introduction
Introducing the User Model Activity Package: Effortlessly Track Changes in Your Models
Have you ever found yourself in need of a simple yet effective way to track and log changes made to your Laravel models? Look no further! We are thrilled to present our User Model Activity package, designed to save the logs of model events such as creation, update, and deletion into a convenient log file. With this package, monitoring and auditing changes in your application's models has never been easier.
Installation
You can install the package with Composer.
After installation run the following command to publish the necessary assets and files:
That's it. You have successfully installed and published the required files and assets of the package.
Usage
Once you have installed and configured the package, you can start using it to track changes in your models. Follow this step-by-step guide to get started:
-
Logging File Configuration
First things is first! Go to your and add the following to the channels array:
Now, you can use the trait inside the model and all the logs will be tracked.
That is it. Now just visit URL and select the file where you saved the logs. You will see all the logs.
Conclusion
The User Model Activity package offers a straightforward and efficient solution for tracking changes made to your Laravel models. It simplifies the process of monitoring, auditing, and debugging model-related changes. Enhance your application's maintainability and gain valuable insights into your data with the User Model Activity package.
Contributions
Contributions are most welcome! Please pick one of the known issues and future plans or implement your own idea to help the package grow.
Current Contributers: Contributors.
Hanif Hefaz |
Known issues and future plans
-
To further enhance the package, we plan to bring some changes in the log views. currently its not optimized.
-
A better approach to integrate user's details as well to the log. currently it will save details of model, and if your model has created_by it will be logged, but we need a better approach for this.
-
Parsing of the logs in a better way.
- The trait is not working in spatie's Role and Permission models if they are extended from parent model such as below:
If you found any issue, please post it to issues section.