mrpowerup/filament-sql-field 问题修复 & 功能扩展

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

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

mrpowerup/filament-sql-field

最新稳定版本:2.0.0

Composer 安装命令:

composer require mrpowerup/filament-sql-field

包简介

And a field to write SQL sentences using codemirror 5.

README 文档

README

image image image

Installation Filament v4.x

You can install the package via composer:

composer require mrpowerup/filament-sql-field "dev-filament-v4"

Installation Filament v3.x

You can install the package via composer:

composer require mrpowerup/filament-sql-field

Or if you want to use 1.x version of the package you can use:

composer require mrpowerup/filament-sql-field "^1.0"

Or if you want to use 2.x version of the package you can use:

composer require mrpowerup/filament-sql-field "^2.0"

Usage

use MrPowerUp\FilamentSqlField\FilamentSqlSection; use MrPowerUp\FilamentSqlField\FilamentSqlField;
public static function form(Form $form): Form { return $form ->schema([ FilamentSqlSection::make() ->schema([ FilamentSqlField::make('sql') ->fullscreen() // Allow Fullscreen mode ->editorHeight(300) // Set height of editor ->autoGetTables() // Automatically get tables from database ->default("SELECT * FROM users WHERE 1;") ->columnSpanFull(), ]) ]); }

MIME types defined

  • text/x-sql
  • text/x-mysql
  • text/x-mariadb
  • text/x-cassandra
  • text/x-plsql
  • text/x-mssql
  • text/x-hive
  • text/x-pgsql
  • text/x-gql
  • text/x-gpsql
  • text/x-esper
  • text/x-sqlite
  • text/x-sparksql
  • text/x-trino

If you need to update the editor value with dispatch here is an example:

$this->dispatch('updatePlugin', $record->sql);
@script <script> $wire.on('updatePlugin', (event) => { window.editor.setValue(event[0]); }); </script> @endscript

Links

License

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

统计信息

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

GitHub 信息

  • Stars: 11
  • Watchers: 1
  • Forks: 1
  • 开发语言: JavaScript

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-01-04

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固