LaravelPackages.net
Acme Inc.
Toggle sidebar
bytelaunch/readonly-on-update

A Laravel Nova tool.

11.769
3
About bytelaunch/readonly-on-update

bytelaunch/readonly-on-update is a Laravel package for a laravel nova tool.. It currently has 3 GitHub stars and 11.769 downloads on Packagist. Install it with composer require bytelaunch/readonly-on-update. Discover more Laravel packages by bytelaunch or browse all Laravel packages to compare alternatives.

Last updated

Nova Readonly on Update

This package provides a readonlyOnUpdate() method to your Fields.

Example

Example

Requirements

This package requires:

  • PHP ^7.3.
  • Laravel Nova ^2.0 or ^3.0.

Installation

You can install this package in a Laravel app that uses Nova via composer:

composer require bytelaunch/readonly-on-update

Usage

Add the following code in your own resource implementation:

<?php

...

class YourResource extends Resource {

    ...

    public function fields(Request $request)
    {
        return [
            ...

            // Are you ready?
            // --------------
            // 1. Use readonlyOnUpdate() method
            // 2. See the results
            Field::make(__('Column'), 'column') // Use whatever Field
                ->readonlyOnUpdate()
        ];
    }

Disclaimer

This package isn't tested, but it works well for me. Feel free to make PR with improvements.

Star History Chart