smart145/inline-boolean 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

smart145/inline-boolean

最新稳定版本:v1.0.1

Composer 安装命令:

composer require smart145/inline-boolean

包简介

A Laravel Nova boolean field that can be directly edited from the index or detail page of a resource.

README 文档

README

Latest Stable Version Total Downloads License

Adds the ability to edit a boolean field directly from the index or detail page of a resource.

Prerequisites

Installation

$ composer require markrassamni/inline-boolean

Usage

Use the MarkRassamni\InlineBoolean\InlineBoolean field in your Nova resource:

use MarkRassamni\InlineBoolean\InlineBoolean;

class MyResource extends Resource
{
    public function fields(Request $request)
    {
        return [
            InlineBoolean::make('Enabled')
                ->inlineOnIndex()  // Use inline field on the index page
                ->inlineOnDetail()  // Use inline field on the detail page
                ->enableMessage('Boolean has been enabled.')  // Toast message when enabling boolean
                ->disableMessage('Boolean has been disabled.')  // Toast message when disabling boolean
                ->trueText('Enabled')  // Change the text describing true boolean values
                ->falseText('Disabled')  // Change the text describing false boolean values
                ->showTextOnIndex()  // Show true/false text beside the checkbox on the index page
        ];
    }
}

统计信息

  • 总下载量: 101.09k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 17
  • 开发语言: Vue

其他信息

  • 授权协议: MIT
  • 更新时间: 2020-04-10