laravel-nova-tools
v1.1.1
Published
basic JS tools for projects which uses Laravel Nova
Downloads
16
Readme
Intro
This package gives some JS tools for Laravel projects that uses Laravel Nova extension.
Tools
renderTable(data, labels)
- renders html table in a Laravel Nova style from data Object.
Params:
data: array of data objects
labels: object with column names (optional)
How to use
install
npm i laravel-nova-tools
changes
v 1.1.1
- fixed header styles
- added renderTable 'options' param (default: {showBorders: false, Tight: false })
usage
<div class="table"></div>
</script>
import tools from 'laravel-nova-tools'
...
mounted() {
let data = {
{id: 0, name: 'Buba'},{id:1, name: Boba}
}
let table = tools.renderTable(data, {id: 'ID', name: 'Name'}, {tight: true})
document.getElementsByClassName("table")[0].appendChild(table)
}