Download the PHP package lyrasoft/attachment without Composer

On this page you can find all versions of the php package lyrasoft/attachment. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package attachment

LYRASOFT Attachment Uploader Package

screenshot 2022-01-13 下午04 01 08

安裝

然後複製 migration 檔案

如果需要更改 entity、repo 時可複製出來

使用

先到 unicorn.php 中註冊 AttachmentPackage

Options

name require Desc
id false 欄位 id,預設帶隨機碼,需要 JS 控制可以自訂
name false 欄位名稱,會自動後綴 [],預設是 attachments
items true 提供已上傳檔案列表做使用
insertBtn false 插入文章的btn,可以是 true 或 Tinymce element 的選擇器
accept false 限制檔案類型

如果要單獨使用 檔案列表 或是 上傳Input的話 也可以單獨使用

CSS / JS

插入 attachment 元件後,就會自行插入,如果需要手動引入,可以下面程式碼

Slot

如果你想自訂額外的按鈕的動作,可以用 buttons slot

元件個別引入

備註

  1. 記得要在 view 中利用repo 或是 ORM 取出 attachments 並塞入 field 的 option 中。
  2. 在controller 內記得寫儲存及刪除的內容, 有刪除檔案的話可以從 $app->input() 中取得 remove_attachments 裡面是 attachment 的 ID

All versions of attachment with dependencies

PHP Build Version
Package Version
Requires myclabs/php-enum Version ^1.8
lyrasoft/luna Version ^1.0||^2.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package lyrasoft/attachment contains the following files

Loading the files please wait ....