gabrieliuga / laravel-nova-markdownextra
Laravel Nova Markdown 扩展,允许从剪贴板粘贴图片。
v1.0.0
2021-01-06 14:53 UTC
Requires
- php: ^7.3|^8.0
- laravel/framework: >=6.2
- laravel/nova: >=2.9
This package is auto-updated.
Last update: 2024-09-06 23:32:28 UTC
README
允许您直接将图片从剪贴板粘贴到 Markdown 编辑器中
安装
您可以通过 composer 安装此包
composer require gabrieliuga/laravel-nova-markdownextra
使用方法
<?php namespace App\Nova; use Gabrieliuga\Markdownextra\MarkdownExtra; use Illuminate\Http\Request; use Laravel\Nova\Fields\ID; use Laravel\Nova\Fields\Text; class Blog extends Resource { /** * The model the resource corresponds to. * * @var string */ public static $model = \App\Models\Blog::class; /** * The single value that should be used to represent the resource when being displayed. * * @var string */ public static $title = 'id'; /** * The columns that should be searched. * * @var array */ public static $search = [ 'id', ]; /** * Get the fields displayed by the resource. * * @param \Illuminate\Http\Request $request * @return array */ public function fields(Request $request) { return [ ID::make(__('ID'), 'id')->sortable(), Text::make('Title'), MarkdownExtra::make('Content') ]; } ...
变更日志
请参阅变更日志获取最近更改的详细信息。
贡献
请参阅贡献指南获取详细信息。
安全
如果您发现任何与安全相关的问题,请通过me@iuga.dev发送电子邮件,而不是使用问题跟踪器。
鸣谢
许可证
MIT 许可证(MIT)。有关更多信息,请参阅许可证文件。