Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/laravel-admin-extensions/php-editor
PHP editor extension for laravel-admin based on code-mirror
https://github.com/laravel-admin-extensions/php-editor
Last synced: about 1 month ago
JSON representation
PHP editor extension for laravel-admin based on code-mirror
- Host: GitHub
- URL: https://github.com/laravel-admin-extensions/php-editor
- Owner: laravel-admin-extensions
- License: mit
- Created: 2018-09-11T16:07:25.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2018-09-23T16:13:33.000Z (about 6 years ago)
- Last Synced: 2024-10-29T02:09:46.235Z (about 1 month ago)
- Language: PHP
- Size: 5.86 KB
- Stars: 8
- Watchers: 2
- Forks: 5
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-laravel-admin - php-editor - PHP 语言编辑器 (扩展包 / 字段类扩展包)
README
PHP editor extension for laravel-admin based on code-mirror
======[DEMO](http://demo.laravel-admin.org/code-mirror/php) (Login using `admin/admin`)
## Installation
```bash
composer require laravel-admin-ext/php-editorphp artisan vendor:publish --tag=laravel-admin-code-mirror
```## Configuration
In the `extensions` section of the `config/admin.php` file, add some configuration that belongs to this extension.
```php'extensions' => [
'php-editor' => [
//Set to false if you want to disable this extension
'enable' => true,
// Editor configuration
'config' => [
]
]
]```
The configuration of the editor can be found in [CodeMirror Documentation](https://codemirror.net/)
## Usage
Use it in the form:
```php
$form->php('code');
```Set height
```php
$form->php('code')->height(500);
```## Donate
> Help keeping the project development going, by donating a little. Thanks in advance.
[![PayPal Me](https://img.shields.io/badge/Donate-PayPal-green.svg)](https://www.paypal.me/zousong)
![-1](https://cloud.githubusercontent.com/assets/1479100/23287423/45c68202-fa78-11e6-8125-3e365101a313.jpg)
License
------------
Licensed under [The MIT License (MIT)](LICENSE).