Download the PHP package ahmedkandel/nova-checklist without Composer
On this page you can find all versions of the php package ahmedkandel/nova-checklist. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download ahmedkandel/nova-checklist
More information about ahmedkandel/nova-checklist
Files in ahmedkandel/nova-checklist
Package nova-checklist
Short Description A Laravel Nova field to display a list of items to complete.
License MIT
Informations about the package nova-checklist
Laravel Nova Checklist Field
Based on encima-io/novachecklists
This package is made to allow you to easily create checklists in Laravel Nova. All you need is a text/json column on you model to store the items.
Installation
You can install the package via composer:
Usage
To use this package you'll need a text or JSON column on you model to save the items, as they are persisted as json on your model.
Form-page
The ->placeholder()
method allows you to specify your placeholder-text for the "add new item field".
The ->placeholderCounter()
method lets you show the item number when adding new item. If there is already 5 items, then it will say "Add item 6".
The ->storeUserName()
method allows you to save which user created or completed the item. You specify which column on the User model you want to save on item, it default to use the "name" column.
The ->canEdit()
method can be used to allow/disallow add/edit/delete items. By passing a boolean of closure to the method, If true the user can add/edit/delete items, If false the user can only check/uncheck items.
You can edit an existing item by clicking on it unless it is not allowed by ->canEdit()
method.
Detail-page
The ->showDetails()
method lets you show who completed the item and how long ago it was completed.
Index-page
By default this package will only show the items count on the index page.
The ->showItemStatusOnIndex()
will change the index to show how many items are completed of the total amount of items.
The ->showCompletionOnIndex()
method will let you show how many percent of the items are completed.
When you click on the label a tooltip will all details will be shown.
License
The MIT License (MIT).