承接 aleksandro-del-piero/livewire-locked-properties 相关项目开发

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

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

aleksandro-del-piero/livewire-locked-properties

最新稳定版本:1.0.0

Composer 安装命令:

composer require aleksandro-del-piero/livewire-locked-properties

包简介

Livewire locked properties

README 文档

README

The package allows you to designate component properties as locked.

Tested package on Livewire v2.12.6

Installation

You can install the package via composer:

composer require aleksandro_del_piero/livewire-locked-properties

Documentation

You need to add a trait to the component AleksandroDelPiero\LivewireLockedProperties\Traits\WithLockedLivewire;

To designate a property as protected, you must add it to a protected property $locked or declare a method locked().

namespace App\Http\Livewire;

use Livewire\Component;
use AleksandroDelPiero\LivewireLockedProperties\Traits\WithLockedLivewire;

class TestLivewire extends Component
{
    use WithLockedLivewire;

    public $name;

    protected $locked = [
        'name'
    ];
...

or a protected method 'locked'

namespace App\Http\Livewire;

use Livewire\Component;
use AleksandroDelPiero\LivewireLockedProperties\Traits\WithLockedLivewire;

class TestLivewire extends Component
{
    use WithLockedLivewire;

    public $name;

    protected function locked(): array
    {
        return ['name'];
    }
...

If a component has both a method and a property, the method will take precedence.

License

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

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2023-12-11