定制 grocerycrud/image-crud 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

grocerycrud/image-crud

最新稳定版本:1.0.0

Composer 安装命令:

composer require grocerycrud/image-crud

包简介

README 文档

README

Total Downloads

Image CRUD is an automatic multiple image uploader for Codeigniter, using the same philosophy as grocery CRUD library. Just some simple lines of code and you have all the functionality that you need.

Requirements:

  • Codeigniter version 4
  • PHP version 8 or higher
  • PHP GD2 extension
  • Composer

Installation:

composer require grocerycrud/image-crud
cp vendor/grocerycrud/image-crud/src/ImageCrud/ImageCrudPublisher.php app/Publishers
php spark publish

Controller Example:

<?php

namespace App\Controllers;

use ImageCrud\Core\ImageCrud;

class ImagesExamples extends BaseController
{

    private function _example_output($output = null) {
        if (isset($output->isJSONResponse) && $output->isJSONResponse) {
            header('Content-Type: application/json; charset=utf-8');
            echo $output->output;
            exit;
        }

        return view('image_crud/template.php', (array)$output);
    }

    public function example1(): string
    {
        $imageCrud = new ImageCrud();

        $imageCrud->setPrimaryKeyField('id');
        $imageCrud->setUrlField('url');
        $imageCrud->setTable('example_1')
            ->setImagePath('uploads');

        $output = $imageCrud->render();

        return $this->_example_output($output);
    }
}

Limitations:

Since this is basically the same library as we used for Codeigniter 3, it has the same limitations.

  • Image CRUD only works when the url that loads it is a standard Controller / View path. For example: /controller/method. This will most probably change in the future

https://www.grocerycrud.com/image-crud-codeigniter-4

统计信息

  • 总下载量: 6
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 2
  • 点击次数: 2
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 2
  • Watchers: 2
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-05-04