Download the PHP package jobsys/importexport-module without Composer

On this page you can find all versions of the php package jobsys/importexport-module. 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 importexport-module

Importexport 导入导出模块

该模板主要功能是基于 Excel 进行数据的导入导出。

!> 该模板的数据导入功能为异步执行,依赖于 Laravel 队列,请确保后台已经正确开起了队列命令。

模块安装

依赖

配置

模块配置 config/module.php

maatwebsite/excel 配置

具体配置查看 Laravel Excel

模块功能

数据导入

数据导入由 NewbieImporter 组件负责前端的上传、字段对应、进度显示等功能,并结合 ImportexportService 提供的 API 进行数据的导入。

开发规范

  1. Controller 中定义本次导入的字段,每个字段有 4 个属性分别为 field 接收并存储的字段名,label 字段的名称,rule 字段的验证规则。

    属性 类型 说明
    field string 接收并存储的字段名
    label string 字段的名称
    rule string 字段的验证规则,规则与 Laravel Form Validation 一致
    type string 字段的类型,如 date,导入时会自动对该列数据进行处理
  2. 在页面引入 NewbieImporter 组件,其中 url 属性为上一步中的 API,progress-url 由本模块提供的默认路由,extra-data 可以定义一些其它的附属属性,并可以将其与上传的数据一并发送到 Controller。

    组件属性 extra-data 与上一步中的 extra_data 不是同一个属性,组件中的 $extra-data 仅会在上传时一并发送到 Controller,而上一步中的 $extra_data 会在 Importer 的 store 方法中一并处理。

  3. 处理并存储数据,在 app\Importer 中定义一个 Importer 类,该类继承于 Modules\Importexport\Importers\CollectionImporter,重写该类的 store 方法,该方法有两个参数 $row$extra_data

    参数 类型 说明
    $row array Excel 文件上传的一行数据
    $extra_data array 附属数据

数据导出

使用 Laravel Excel 提供的 Excel 类进行数据的导出,具体使用方法参考 Laravel Excel

开发规范

  1. app\Exporters 中定义一个 Exporter 类,参考如下:

  2. 在 Controller 中调用 Excel 类的 download 方法进行导出,参考如下:

模块代码

Controller

UI

PC 组件

Service


All versions of importexport-module with dependencies

PHP Build Version
Package Version
No informations.
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 jobsys/importexport-module contains the following files

Loading the files please wait ....