laravel-admin-ext/php-editor

基于code-mirror的laravel-admin PHP代码编辑器扩展

v1.0.0 2018-09-11 17:20 UTC

This package is auto-updated.

Last update: 2024-09-17 17:13:27 UTC


README

DEMO (使用 admin/admin 登录)

安装

composer require laravel-admin-ext/php-editor

php artisan vendor:publish --tag=laravel-admin-code-mirror

配置

config/admin.php 文件的 extensions 部分添加此扩展的相关配置。

    'extensions' => [

        'php-editor' => [
        
            //Set to false if you want to disable this extension
            'enable' => true,
            
            // Editor configuration
            'config' => [
                
            ]
        ]
    ]

编辑器的配置可以在CodeMirror 文档中找到

使用方法

以以下形式使用

$form->php('code');

设置高度

$form->php('code')->height(500);

捐赠

通过捐赠一点小钱,帮助项目持续开发。提前感谢。

PayPal Me

-1

许可协议

遵循MIT 许可协议 (MIT)