• Categories
    • PHP
    • phpMyAdmin
    • PHPMailer
    • FFMpeg
    • PHPEXcel
    • PHPDoc
    • PHPUnit
    • CakePHP
    • CakePHP 2.0
    • Cake PHP 2.1
    • CakePHP Model
    • Facebook PHP SDK
    • composer-php
    • PHP 7
    • PHP GD
    All Categories
  • About

Laravel Nova Dependency Container what are the allowed resource properties other than id in dependsOn

phplaravelpluginslaravel-nova


PHP Snippet 1:

Text::make('Recipient')
    ->hide()
    ->dependsOn(
        ['type'], 
        function (Text $field, NovaRequest $request, FormData $formData) {
            if ($formData->type === 'gift') {
                $field->show()->rules(['required', 'email']);
            }
        }
    ),

Related Snippets

Laravel Livewire: jQuery not working in child component loaded via @if statement

Laravel excel maatwebsite 3.1 import, date column in excel cell returns as unknown format number. How to solve this?

PHPUnit 7: Failed asserting that exception of type InvalidArgumentException is thrown

Combine multiple columns into an array as one of the key in a results set

LARAVEL: How to fetch id dynamically in a query builder?

Why does array_map() with null as callback create an "array of arrays"?

Laravel display validation error

VichUploaderBundle error "Expected argument of type "File", "NULL" given" when submitting the form without selecting any file

Getting public posts of a random user from Facebook API

display WooCommerce “Add to cart” button with short-code [add_to_cart ] dynamically

Show date difference as "20" instead of "20 years ago"

Chunk and transpose a flat array into rows with a specific number of columns

Composer Script echo

Where do I need to place a hook for phpunit?

How to get the total hour from starting time to end time in php

About Contact Privacy policy Terms and conditions