naykel / gotime
NayKel Laravel 应用程序的入门包
v0.17.0
2024-01-21 08:12 UTC
Requires
- php: ^8.1
- livewire/livewire: ^3.3
- parsedown/laravel: ^1.2
Requires (Dev)
- phpunit/phpunit: ^10
- dev-main
- dev-master
- v0.17.0
- v0.16.0
- v0.15.0
- v0.14.5
- v0.14.4
- v0.14.3
- v0.14.2
- v0.14.1
- v0.14.0
- v0.13.4
- v0.13.3
- v0.13.2
- v0.13.1
- v0.13.0
- v0.12.7
- v0.12.6
- v0.12.5
- v0.12.4
- v0.12.3
- v0.12.2
- v0.12.1
- v0.12.0
- v0.11.0
- v0.10.2
- v0.10.0
- v0.9.0
- v0.8.5
- v0.8.4
- v0.8.3
- v0.8.2
- v0.8.1
- v0.8.0
- v0.7.0
- v0.6.4
- v0.6.3
- v0.6.2
- v0.6.1
- v0.6.0
- v0.5.3
- v0.5.1
- v0.5.0
- v0.4.1
- v0.4.0
- v0.3.3
- v0.3.2
- v0.3.1
- v0.3.0
- v0.2.0
- v0.1.2
- v0.1.1
- v0.0.1
- dev-update
This package is auto-updated.
Last update: 2024-09-29 21:56:45 UTC
README
NAYKEL Gotime
NayKel Laravel 应用程序的入门包。
安装
要开始使用,请使用 Composer 包管理器安装 Gotime
composer require naykel/gotime
接下来,使用 gotime:install 命令安装 Gotime 资源
php artisan gotime:install
配置文件在包注册时会合并,但您可以选择发布 naykel.php
配置文件。
php artisan vendor:publish --tag=gotime-config
已知问题
此驱动程序不支持创建临时 URL。
https://laracasts.com/discuss/channels/livewire/pdf-passes-image-validation?page=1&replyId=806087
if (! $this->isPreviewable()) {
// show a missing image icon (?) for files that cannot be previewed
return 'data:image/png;base64...gg-1.5==';
}
挂载资源或创建空白模型
根据路由,Livewire 组件将挂载资源并使用路由模型绑定设置 $editing
,或者从 $initialValues
数组设置初始值以创建一个新空白模型。
添加主图像
$tmpImage
变量在特质中设置,因为不需要手动使用它。 ??
图像参数
- 设置
$disk
或留空以使用public
????
在特质中定义的属性可以在主组件的 mount()
方法中重置或覆盖
我艰难学到的经验教训
不要定义一个文件数据类型为 string
的变量。为什么?它是一个文件,而不是字符串!
CkEditor
<div wire:ignore class="frm-row">
<textarea wire:model.blur="editing.description" name="editing.description" id="ckeditor"></textarea>
</div>
@push('scripts')
<script src="https://cdn.ckeditor.com/ckeditor5/27.1.0/classic/ckeditor.js"></script>
<script>
ClassicEditor
.create(document.querySelector('#ckeditor'))
.then(editor => {
editor.model.document.on('change:data', () => {
@this.set('editing.description', editor.getData());
})
})
.catch(error => {
console.error(error);
});
</script>
@endpush
添加新图标
- 更新扩展
svg
到blade.php
find ./resources/views/components/icon -name "*.svg" -type f -exec bash -c 'mv -- "$0" "${0%.svg}.blade.php"' {} \;
- 添加
$attributes
、width
和height
# DON'T RUN THIS WITH EXPORTED FIGMA ICONS, IT WILL ADD THE ATTRIBUTES TWICE find ./resources/views/components/v2/icon -type f -name "*.blade.php" -exec sed -i 's/<svg xmlns="http:\/\/www\.w3\.org\/2000\/svg"/<svg {{ $attributes }} xmlns="http:\/\/www\.w3\.org\/2000\/svg" width="24" height="24"/g' {} + # FOR FIGMA ICONS find ./resources/views/components/icon/other -type f -name "*.blade.php" -exec sed -i 's/<svg xmlns="http:\/\/www\.w3\.org\/2000\/svg"/<svg {{ $attributes }} xmlns="http:\/\/www\.w3\.org\/2000\/svg"/g' {} +