定制 virdiggg/seeder-ci3 二次开发

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

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

virdiggg/seeder-ci3

Composer 安装命令:

composer require virdiggg/seeder-ci3

包简介

Library Seeder from Existing Database for CodeIgniter 3

README 文档

README

Seeder CI3 is a modern CLI-style development toolkit for CodeIgniter 3 inspired by Laravel Artisan and orangehill/iseed.

It provides migration management, database seeding, CRUD scaffolding, faker generation, route inspection, and development helpers while remaining fully compatible with traditional CodeIgniter 3 applications.

Seeder CI3 is designed for developers maintaining legacy systems who still want modern development workflows without migrating away from CodeIgniter 3.

Features

Seeder CI3 includes:

  • Database seeder generation from existing tables
  • Migration generation and execution
  • Migration rollback support
  • CRUD scaffolding
  • Model and controller generators
  • Built-in faker generation
  • Route listing utilities
  • Post-migration hooks
  • PostgreSQL-friendly helpers
  • Lightweight response wrapper controller
  • CLI-style development workflow for CodeIgniter 3

Installation

Install Seeder CI3 via Composer:

composer require virdiggg/seeder-ci3

Quick Start

Create a controller new application/controllers/App_ci3.php for entry point:

<?php defined('BASEPATH') or exit('No direct script access allowed');

use Virdiggg\SeederCi3\MY_AppController;

class App_ci3 extends MY_AppController
{
    public function __construct()
    {
        parent::__construct();
    }
}

Initialize Seeder CI3 inside your project:

php index.php app_ci3 init

The initialization command will automatically:

  • Create App_ci3.php
  • Create CLI bootstrap file ci3
  • Publish Seeder CI3 configuration
  • Publish migration hooks
  • Migrate legacy migration hooks automatically

Generated Files

Initialization may generate:

application/controllers/App_ci3.php
application/config/seeder.php
application/hooks/PostMigration.php
application/hooks/PreMigration.php
ci3

Basic Usage

Show available commands:

php ci3 help

Check installed version:

php ci3 version

Run migrations:

php ci3 migrate

Rollback migrations:

php ci3 rollback

Generate a model:

php ci3 make:model Admin/Users --r --c --m --soft-delete --faker

Generate a seeder:

php ci3 make:seeder users --soft-delete

Generate fake data:

php ci3 make:faker users

List application routes:

php ci3 router:list --postman

Wrapper Controller

Seeder CI3 includes:

Virdiggg\SeederCi3\MY_Controller

A lightweight wrapper controller designed to simplify:

  • JSON responses
  • Pretty JSON formatting
  • Shared view data
  • HTML rendering
  • View rendering

Example:

class Api extends MY_Controller
{
    public function users()
    {
        return $this
            ->pretty(true)
            ->asJson([
                'status' => true,
                'message' => 'Success'
            ]);
    }
}

Migration Hooks

Seeder CI3 supports:

  • Pre-migration hooks
  • Post-migration hooks
  • Legacy hook migration from old controller destructors

Useful for:

  • Grant privilege automation
  • Deployment workflows
  • Logging
  • Database synchronization
  • Environment preparation

Faker Support

Seeder CI3 can generate fake datasets directly from existing table structures.

Example:

php ci3 make:faker users

Supports:

  • Table-based faker generation
  • Default fallback fields
  • Faker-enabled model scaffolding

Route Utilities

Seeder CI3 can inspect routes directly from terminal:

php ci3 router:list

Supports:

  • API route inspection
  • Route auditing
  • Endpoint discovery
  • Postman export

Example:

php ci3 router:list --postman

Currently optimized for:

application/controllers/api/*

Generated files are stored in:

application/storage/

Documentation

Additional documentation:

Philosophy

Seeder CI3 aims to modernize the CodeIgniter 3 development experience without changing the framework's core architecture.

The goal is to provide practical developer tooling for long-term maintenance projects, enterprise systems, and legacy applications that still require fast and efficient workflows.

virdiggg/seeder-ci3 适用场景与选型建议

virdiggg/seeder-ci3 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 213 次下载、GitHub Stars 达 1, 最近一次更新时间为 2023 年 09 月 06 日, 在 PHP 生态内属于活跃度较高的组件。

我们在过去多个企业项目中使用过 virdiggg/seeder-ci3 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 virdiggg/seeder-ci3 我们能提供哪些服务?
定制开发 / 二次开发

基于 virdiggg/seeder-ci3 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

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

GitHub 信息

  • Stars: 1
  • Watchers: 1
  • Forks: 1
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2023-09-06