julio101290/boilerplateservicelayer 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

julio101290/boilerplateservicelayer

最新稳定版本:v1.1.9

Composer 安装命令:

composer require julio101290/boilerplateservicelayer

包简介

A CodeIgniter 4 boilerplate repository for building a service layer to integrate with SAP Business One. It includes pre-built CRUD functionality for products and companies, with features for inventory management, invoice generation (with SAT fields), and user authorization.

README 文档

README

Latest Stable Version Total Downloads Latest Unstable Version License

thumbnail

CodeIgniter 4 Boilerplate Service Layer CFDI V4.0

CodeIgniter4 Boilerplate Service Layer provides a CRUD MVC for managing SAP Service Layer connections per company.
It includes description, URL, port, credentials, and company database fields.

This module integrates with other boilerplates (Companies, BranchOffice, Log) to centralize Service Layer configuration.

Requirements

  • PhpCfdi\SatCatalogos
  • julio101290/boilerplatelog
  • julio101290/boilerplatecompanies
  • julio101290/boilerplatebranchoffice

Installation

Run composer commands

composer require phpcfdi/sat-catalogos
composer require julio101290/boilerplatelog
composer require julio101290/boilerplatecompanies
composer require julio101290/boilerplatebranchoffice
composer require julio101290/boilerplateservicelayer

Run migrations and seeders

php spark boilerplatecompanies:installcompaniescrud
php spark boilerplatelog:installlog
php spark boilerplatebranchoffice:installbranchoffice
php spark boilerplateservicelayer:installservicelayer

BaseController.php Configuration

Add the SAT Catalogs Factory and configure global variables with SQLite DSN:

<?php

namespace App\Controllers;

use CodeIgniter\Controller;
use CodeIgniter\HTTP\CLIRequest;
use CodeIgniter\HTTP\IncomingRequest;
use CodeIgniter\HTTP\RequestInterface;
use CodeIgniter\HTTP\ResponseInterface;
use Psr\Log\LoggerInterface;
// ADD
use PhpCfdi\SatCatalogos\Factory;

abstract class BaseController extends Controller
{
    protected $request;
    protected $helpers = [];
    public $catalogosSAT;
    public $unidadesSAT;

    public function initController(RequestInterface $request, ResponseInterface $response, LoggerInterface $logger)
    {
        parent::initController($request, $response, $logger);

        date_default_timezone_set("America/Mazatlan");

        // ADD
        $dsn = "sqlite:".ROOTPATH."writable/database/catalogossat.db";
        $factory = new Factory();
        $satCatalogos = $factory->catalogosFromDsn($dsn);
        $this->catalogosSAT = $satCatalogos;
    }
}

SAT Catalog Database

Service Layer Menu Example

image

Ready to Use

image

Usage

Explore the code in routes, controllers, and views to understand how it works.

Finally... Happy Coding!

Changelog

Please see CHANGELOG for more details about recent changes.

Contributing

Contributions are welcome and greatly appreciated.

License

This package is free software distributed under the terms of the MIT license.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-09-15

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固