定制 suhaib-kotb/nova-ajax-text 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

suhaib-kotb/nova-ajax-text

最新稳定版本:1.0.1

Composer 安装命令:

composer require suhaib-kotb/nova-ajax-text

包简介

A Laravel Nova field.

README 文档

README

composer require suhaib-kotb/nova-ajax-text

Usage

Specify a request url, and the parent($attribute) to watch.

use SuhaibKotb\NovaAjaxText\AjaxText;
Text::make('National ID', 'national_id'),

AjaxText::make('Full Name', 'name')
    ->parent('national_id')
    ->get('/api/users/{national_id}/name'),

Request Url:

In the above example, we say national_id is the parent. The {national_id} url parameter will equal the National ID field value.

Response Format:

Route::get('/api/users/{national_id}/{property}', function($national_id, $property) {
    $user = \App\User::where('national_id', $national_id)->first();
    return $user->$property ?? '';  // it equal to $user->name;
})->middleware(['nova']);

Always Disabled:

You can use alwaysDisabled option if you don't need to edit the vlaue.

Text::make('National ID', 'national_id'),

AjaxText::make('Full Name', 'name')
    ->alwaysDisabled()
    ->parent('national_id')
    ->get('/api/users/{national_id}/name'),

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2021-02-28