承接 outhebox/nova-hidden-field 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

outhebox/nova-hidden-field

最新稳定版本:v1.0.3

Composer 安装命令:

composer require outhebox/nova-hidden-field

包简介

A Laravel Nova Hidden field.

README 文档

README

GitHub license GitHub issues Total Downloads

Description

This field give the ability to add a hidden fields to your resources.

Support

.

Thank you for considering supporting the development of this package! If you'd like to contribute, you can buy me a coffee or sponsor me to help keep me motivated to continue improving this package. You can also support the project by starring ⭐ the repository.

To buy me a coffee, click the button below:

Buy Me A Coffee

Requrements

  • Laravel 5.7+ with Nova.

Installation

This package can be installed through Composer.

composer require outhebox/nova-hidden-field

Example Usage

Add the field to your resource in the fields method:

use Outhebox\NovaHiddenField\HiddenField;

HiddenField::make('User', 'user_id')
    ->current_user_id(),

Also you can override the default value:

use Outhebox\NovaHiddenField\HiddenField;

HiddenField::make('User', 'column_name')
    ->defaultValue($this->get_client_id()),

/**
 * Function will return your value
 * the returned value should be string
 * 
 * @return string
 */
public function get_client_id()
{
    $client = Client::find(1)->first();
    return $client->id;
}

Another option you may like if you want to use the relationship fields:

use Laravel\Nova\Fields\BelongsTo;
use Outhebox\NovaHiddenField\HiddenField;

HiddenField::make('User', 'user_id')
    ->hideFromIndex(),
    ->hideFromDetail(),
    ->current_user_id()

BelongsTo::make('User')
    ->hideWhenCreating(),
    ->hideWhenUpdating(),

License

The MIT License (MIT). Please see License File for more information.

Donate

If you like this package, you can show your appreciation ???? by donating any amount via Patreon to support ongoing development.

统计信息

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

GitHub 信息

  • Stars: 33
  • Watchers: 1
  • Forks: 4
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-01-04

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固