A Laravel Nova field to show additional data but not clutter the table.
ideatocode/nova-tooltip-field is a Laravel package for a laravel nova field to show additional data but not clutter the table..
It currently has 2 GitHub stars and 27.539 downloads on Packagist (latest version v1.0.2).
Install it with composer require ideatocode/nova-tooltip-field.
Discover more Laravel packages by ideatocode
or browse all Laravel packages to compare alternatives.
Last updated
A Laravel Nova Tooltip field for the index view.
When you want to show additional data but do not want to clutter the table, put it in a tooltip.
Inspired by: https://github.com/philperusse/nova-tooltip-field

Run this command in your Laravel Nova project:
$ composer require helios-live/nova-tooltip-field
Use this field as any other fields. By design, this field will only be shown on index (lists) views.
use Ideatocode\NovaTooltipField\Tooltip;
Tooltip::make('More', function(){
return 'This a tooltip. You can put lengthy content here or any additional info.';
}),
You can also pass HTML to the tooltip.
Tooltip::make('More', function(){
return '<h4>Additional User info</h4>'
. ' <strong>Created at : </strong>' . Carbon::parse($this->created_at)->diffForHumans()
. '<br>'
.' <strong>Updated at : </strong>' . Carbon::parse($this->created_at)->diffForHumans();
})->asHtml(),

You can also pass change the trigger element of the tooltip.
Tooltip::make('More', function(){
return '<h4>Additional User info</h4>'
. ' <strong>Created at : </strong>' . Carbon::parse($this->created_at)->diffForHumans()
. '<br>'
.' <strong>Updated at : </strong>' . Carbon::parse($this->created_at)->diffForHumans();
})->asHtml()->trigger('oh <b>Ya!</b>'),
All contributions are welcomed. Please send a PR.
The styles are based on Bootstrap's Tooltip component.
This package is open-sourced software licensed under the MIT Licence