Looking to hire Laravel developers? Try LaraJobs

laravel-model-log maintained by kamrul-haque

Description
Log model events with data by simply adding a Trait
Last update
2022/12/11 10:49 (dev-master)
License
Links
Downloads
48

Comments
comments powered by Disqus

laravel-model-log

Latest Stable Version Total Downloads Latest Unstable Version License GitHub Repo stars

Log model events with data by simply adding a Trait

Installation

Install the package via composer:

composer require kamrul-haque/laravel-model-log

Migrate the necessary database tables:

php artisan migrate

Usage

  • Add KamrulHaque\LaravelModelLog\Traits\Loggable Trait to the Model you want to log
  • Access the logs by /model-logs uri added to your application by the package
  • To customize the log view, publish package views:
php artisan vendor:publish --provider="KamrulHaque\LaravelModelLog\ModelLogServiceProvider" --tag="views"