Download the PHP package jaocero/activity-timeline without Composer
On this page you can find all versions of the php package jaocero/activity-timeline. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download jaocero/activity-timeline
More information about jaocero/activity-timeline
Files in jaocero/activity-timeline
Package activity-timeline
Short Description Add timelines to custom pages or infolist entries effortlessly. Plus, it teams up smoothly with Spatie Activitylog for easy tracking.
License MIT
Homepage https://github.com/jaocero/activity-timeline
Informations about the package activity-timeline
Activity Timeline
Add timelines to custom pages or infolist entries effortlessly. Plus, it teams up smoothly with Spatie Activitylog for easy tracking.
Installation
You can install the package via composer:
To adhere to Filament's theming approach, you'll be required to employ a personalized theme in order to utilize this plugin.
Custom Theme Installation > Filament Docs
Add the plugin's views to your tailwind.config.js
file.
Usage
This plugin is already accessible within the Infolists builder and now supports both the ->state([])
and ->record()
methods.
When utilizing the ->record()
function, you provide your model in a manner similar to the code showcased below:
Sometimes, when we don't have any info to show to users, it's important to improve their experience by displaying something. So, I include an empty state, like the one in the Filament Table Empty State.
Usage with Spatie Activity Log Package
This plugin works with spatie/laravel-activitylog, making it easy to log user actions in your app. It can also automatically log model events, storing everything in the activity_log
table. To use the plugin, just install spatie/laravel-activitylog
, set it up, and you're good to go.
Creating a Custom Page
You are required to create a custom page within your resources
to display all activities based on the record passed to the route.
Including the Page in your Resource Class
Simply include the custom page in the getPages()
method so that we can access it.
In the actions
method of your table, include an additional custom action. This action should redirect users to the custom page we've generated earlier.
Setting up your Custom Page
Changes are needed in your custom page. Instead of extending using the regular Page
class will make use of a specific class called ActivityTimelinePage
provided by the plugin. Additionally, you should include your resource class.
Configuration
Behind the scenes, the plugin utilizes the previously mentioned infolists entry. We only modify the properties/data, but the logic remains unchanged.
Style customization
Similar to Filament, this plugin also includes CSS hook
classes that enable the customization of different HTML elements through CSS.
This plugin comes with numerous CSS hook
classes. For a straightforward approach, consider using your browser's developer tools to carefully examine the element and identify these classes.
That's all! If you encounter any issues or have features you'd like to discuss, feel free to chat with me in our Discord channel.
Changelog
Please see CHANGELOG for more information on what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Security Vulnerabilities
Please review our security policy on how to report security vulnerabilities.
Credits
- Jay-Are Ocero
- All Contributors
License
The MIT License (MIT). Please see License File for more information.
All versions of activity-timeline with dependencies
filament/filament Version ^3.0
spatie/laravel-package-tools Version ^1.15.0
illuminate/contracts Version ^10.0|^11.0