Skip to content

awesome-nova/tool-actions

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Laravel Nova Tool Actions Package

Latest Version on Github Total Downloads Become a Patron!

  1. Installation
  2. Usage

Installation

You can install the package in to a Laravel app that uses Nova via composer:

composer require awesome-nova/tool-actions

Usage

class AddCommentAction extends ToolAction
{
    public function name()
    {
        return 'Add New Comment';
    }

    public function label()
    {
        return 'Add comment';
    }

    public function handle(ActionFields $fields)
    {
        Comment::create([
            'comment' => $fields->get('comment')
        ]);
    }

    public function fields()
    {
        return [
            Text::make("Comment")->rules('required')
        ];
    }
}

About

WIP Tool Actionsfor Laravel Nova

Resources

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •