pedr0cazz/spatie-log-ui

A simple package to view Spatie activity logs in a UI

v1.0.4 2024-08-14 15:43 UTC

This package is auto-updated.

Last update: 2024-11-14 16:28:03 UTC


README

Latest Stable Version Total Downloads License

A simple Laravel package that provides a user interface to view and manage activity logs generated by the Spatie Laravel Activitylog package.

Features

  • View Activity Logs: See a detailed log of all activities in your Laravel application.
  • Search and Filter: Easily search and filter logs by various criteria, such as action type, subject ID, causer email, etc.
  • Responsive UI: Built with Bootstrap 5, ensuring a responsive and modern interface.

image image

Requirements

Installation

To install the package via Composer, run the following command:

composer require pedr0cazz/spatie-log-ui

Publish Assets

After installing the package, you may want to publish the package's views to customize them:

php artisan vendor:publish --tag=spatie-log-ui-views

Usage

Once installed, the package will automatically register its routes and service provider. You can access the UI by visiting the following route in your browser:

/spatie-ui

Make sure you are logged in and have the necessary authentication middleware applied (auth and verified).

Configuration

If you need to customize the package further, you can:

  1. Publish and Edit Views: Customize the look and feel by editing the published views.
  2. Customize Logic: Override or extend the functionality by editing the controllers and services if necessary.

Routing

The following routes are registered by this package:

  • GET /spatie-ui - Displays the activity log UI.
  • GET /spatie-ui/get-ajax-log-data - Fetches log data via AJAX for DataTables.
  • POST /spatie-ui/get-ajax-log-details - Fetches detailed information for a specific log entry.

Development

If you want to contribute or customize the package for your own needs:

  1. Clone the repository.
  2. Install the dependencies using composer install.
  3. Make your changes and submit a pull request if applicable.

License

This package is open-sourced software licensed under the MIT license.

Contributing

Contributions are welcome! Please feel free to submit a pull request or open an issue.

Support

If you encounter any issues or have any questions, please open an issue on GitHub.

Acknowledgements

This package is built on top of the excellent Spatie Laravel Activitylog package. A big thank you to the Spatie team for their hard work and dedication to the Laravel community.

Key Sections:

  1. Introduction: Briefly explains what the package does.
  2. Features: Highlights the main features of the package.
  3. Requirements: Lists the required versions of PHP, Laravel, and other dependencies.
  4. Installation: Provides clear instructions on how to install the package using Composer.
  5. Usage: Details how to access the UI and configure the package.
  6. Routing: Lists the routes that the package registers.
  7. Development: Information for developers who want to contribute or customize the package.
  8. License: Specifies the license under which the package is released.
  9. Contributing: Encourages contributions and provides guidance on how to do so.
  10. Support: Directs users to GitHub for support.
  11. Acknowledgements: Credits the Spatie team for their underlying package.