josedaian/select2wire 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

josedaian/select2wire

最新稳定版本:v2.0.1

Composer 安装命令:

composer require josedaian/select2wire

包简介

Select2 for livewire components.

README 文档

README

josedaian/select2wire Laravel 10 Latest Stable Version Total Downloads License Livewire

Laravel package for handling Select2 inputs for Livewire components.

Requirements

Quick Installation

composer require josedaian/select2wire

For Livewire 2.x version, go here: select2wire v1.x

Usage

Add the following line within your blade view, below the select2.js and jquery.js scripts

@select2wireScript

Within your Livewire component class, call the trait to do one of the functions when loading the component.

use Livewire\Component;
use JoseDaian\Select2\Traits\HasSelect2Wire;

class ExampleComponent extends Component
{
    use HasSelect2Wire;
}

If you don’t have a custom init event, you can call the initSelect2 event directly within your component view.

<div wire:init="initSelect2">
    ...
    <!-- All your selects here -->
</div>

Or in case you already have an init event inside your component, just add the following line

public function customInitFunction()
{
    // your code
    $this->initSelect2();
}

And within your blade view, you’ll need to add the data-select2wire="select2" attribute to your inputs select.

<select data-select2wire="select2">
    <!-- options -->
</select>

Contributing

Please see CONTRIBUTING for details.

Security

If you discover any security related issues, please email josedaian.cabrera@gmail.com instead of using the issue tracker.

Credits

Acknowledgments

This package was inspired by livewire-select2.

License

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

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2023-10-28

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固