All Projects → MohmmedAshraf → nova-hidden-field

MohmmedAshraf / nova-hidden-field

Licence: MIT License
A Laravel Nova Hidden field.

Programming Languages

PHP
23972 projects - #3 most used programming language
Vue
7211 projects
javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to nova-hidden-field

nova-url-field
A URL input and link field for Laravel Nova
Stars: ✭ 96 (+200%)
Mutual labels:  nova, laravel-nova, laravel-nova-field
Lang
List of 78 languages for Laravel Framework 4, 5, 6, 7 and 8, Laravel Jetstream , Laravel Fortify, Laravel Breeze, Laravel Cashier, Laravel Nova and Laravel Spark.
Stars: ✭ 6,285 (+19540.63%)
Mutual labels:  laravel-nova, laravel8
laravel-nova-visual-composer
Visual Composer for Laravel Nova
Stars: ✭ 15 (-53.12%)
Mutual labels:  nova, laravel-nova
nova-inline-morph-to
A Laravel Nova field for displaying morphTo relationship inline.
Stars: ✭ 32 (+0%)
Mutual labels:  nova, laravel-nova-field
nova-inspire
The best way to connect with your customers is by reaching out and inspiring them. ~ Me
Stars: ✭ 14 (-56.25%)
Mutual labels:  nova, laravel-nova
nova-sluggable
Slug field for Laravel Nova
Stars: ✭ 40 (+25%)
Mutual labels:  nova, laravel-nova
nova-json-wrapper
Allows you to group Nova fields and merge their output into a single JSON column
Stars: ✭ 14 (-56.25%)
Mutual labels:  nova, laravel-nova-field
nova-table-field
Table field for Laravel Nova
Stars: ✭ 29 (-9.37%)
Mutual labels:  laravel-nova, laravel-nova-field
nova-system-resources
Display the system usage in Laravel-Nova
Stars: ✭ 30 (-6.25%)
Mutual labels:  nova, laravel-nova
nova-qrcode-field
A Laravel Nova field to generate QR Code
Stars: ✭ 28 (-12.5%)
Mutual labels:  nova, laravel-nova
nova-unlayer-field
🦜 Drag’n’drop email builder for Laravel Nova that uses Adds a Laravel Nova field for Unlayer service under the hood.
Stars: ✭ 27 (-15.62%)
Mutual labels:  nova, laravel-nova-field
nova-horizon-stats
Nova cards for Laravel applications that use Laravel Horizon
Stars: ✭ 31 (-3.12%)
Mutual labels:  nova, laravel-nova
laravel-nova-order-nestedset-field
Laravel Nova field that make your resources orderable
Stars: ✭ 21 (-34.37%)
Mutual labels:  nova, laravel-nova
nova-grouped-field
Combine multiple Nova fields as one field output
Stars: ✭ 43 (+34.38%)
Mutual labels:  laravel-nova, laravel-nova-field
backend
Laravel 8 backend for a genealogy website.
Stars: ✭ 82 (+156.25%)
Mutual labels:  laravel8
COA
Openstack Foundation Openstack Certified Administrator exam Preparation
Stars: ✭ 41 (+28.13%)
Mutual labels:  nova
nova-translatable
Nova Field for spatie/laravel-translatable package.
Stars: ✭ 84 (+162.5%)
Mutual labels:  laravel-nova
Nova-Menu-Builder
A Menu Builder for Laravel Nova
Stars: ✭ 63 (+96.88%)
Mutual labels:  nova
nova-rtl-theme
RTL layout for Laravel Nova.
Stars: ✭ 38 (+18.75%)
Mutual labels:  nova
select-auto-complete
An auto-completing Laravel Nova search field
Stars: ✭ 34 (+6.25%)
Mutual labels:  laravel-nova

Laravel Nova Hidden Field

GitHub license GitHub issues Total Downloads

Description

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

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.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].