PHP code example of ahmedkandel / nova-checklist

1. Go to this page and download the library: Download ahmedkandel/nova-checklist library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

ahmedkandel / nova-checklist example snippets


use Ahmedkandel\NovaChecklist\Checklist;

Checklist::make('Tasks')
    ->placeholder('Add another task')   // Defaults to "Add item"
    ->placeholderCounter()              // Not active by default
    ->storeUserName()                   // Not active by default, accepts user-model column. Uses "name" when column isn't provided.
    ->showDetails()                     // Not active by default
    ->showItemStatusOnIndex()           // Not active by default
    ->showCompletionOnIndex(),          // Not active by default

->canEdit(function ($request) {
    return $request->isCreateOrAttachRequest() || $request->user()->isAdmin();
})