定制 shipu/laratie 二次开发

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

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

shipu/laratie

Composer 安装命令:

composer require shipu/laratie

包简介

Laravel Package Boilerplate

README 文档

README

Laravel Package Development Boilerplate.

Features

  • Make package structure within a second
  • Adding package resource using command line
  • Easy way to define your package custom structure
  • Adding custom stubs facilities
  • Support Spatie Laravel Package Tools (Read More)
  • Support Filament Plugin Development (Read More)

Installation

Go to terminal and run this command

composer require shipu/laratie

Wait for few minutes. Composer will automatically install this package for your project.

For Laravel

Below Laravel 5.5 open config/app and add this line in providers section

Shipu\Tie\LaravelTieServiceProvider::class,

Now run this command in your terminal to publish this package resources:

php artisan vendor:publish --tag=tie-config

Quick Usages

Go to terminal and run this command with replace vendor to your username and package_name to your package name

php artisan package:create vendor package_name
or 
php artisan package:create vendor/package_name
or 
php artisan package:create

Then run composer dump-autoload ;

Package Resources

if you want to create your package resource then run below command:

php artisan package:file vendor/package --stubkey=fileName
or 
php artisan p:f vendor/package --stubkey=fileName

Suppose you want make a controller for your package then:

php artisan package:file vendor/package --controller=TestController

Available stubKey :

--controller 
--command 
--events
--facades
--config
--migration
--job
--provider
--routes
--middleware
--class 
--exceptions
--key

If you have your own custom stubKey then you can choose --key for create package resource and value will be your stubKey.

Package Root Directory

If you need to change your all packages root directory then Open config/tie.php and update root directory path.

'root'          => base_path('packages'), // Base directory

Pckage Owner

Open config/tie.php for setup your vendor name and rootNamespace. It's not mendatory.

'vendor'        => '', // Your github username. For Example 'vendor' => 'shipu'
'rootNamespace' => '', // Root Namespace For Example: 'rootNamespace'   => 'Shipu'

Package Structure

Open config/tie.php for setup your own package structure. Available configuration:

<?php
return [
    ...
    'stubs' => [
        ...
        'structure' => [
            'stubKey' => [
                'namespace' => 'Namespace',
                'case'  => 'choose one from [lower, upper, snake, title, camel, kebab, studly']' // default studly
                'path' => 'your_path/folderName',
                'suffix' => 'FileNameSuffix',
                'prefix' => 'PrefixFileName',
                'extension' => 'file extension. dot php as default file extension'
                'files' => [
                    //  default file here
                    'default.extension',
                    'default.php',
                    'default.ini',
                    'default.jpg',
                    'PACKAGE_NAME.php'
                ]
            ],
            // or
            'stubKey' => 'your_path/folderName'
        ]
        ...
    ]
    ...
];

Package Stub configuration

Open config/tie.php :

<?php
return [
    ...
    'stubs' => [
        'path'      => [
            // adding more stub path for customize stub or new stub
            base_path('vendor/shipu/laravel-tie/src/Consoles/stubs'),
        ],
        'default'   => [
            // default folder structure with stub key
            'composer',
            'src',
            'config',
            //'provider', // laravel service provider
            //'filament-plugin-provider', // please uncomment if you need filament plugin service provider
            'spatie-provider', // spatie service provider. comment if you using filament plugin provider
            'tests',
        ],
        'root'      => 'stubKey', // folder path which is concating with vendor/package on composer.json
        ...
    ]
    ...
];

String Replacement

For replace string to another string on stub template. Open config/tie.php :

return [
    ...
    'stubs' => [
        ...
        'replace'   => [
            // ADD YOUR REPLACEMENT STRING. For Example:
            'REPLACEMENT_KEY'    => 'Replacement String',
            'VENDOR_NAME_LOWER'  => 'shipu',
            'VENDOR_NAME'        => 'Shipu',
        ],
        ...
    ]
    ...
];

Credits

Security Vulnerabilities

If you discover a security vulnerability within LaraTie, please send an e-mail to Shipu Ahamed via shipuahamed01@gmail.com.

License

The LaraTie package is open-sourced software licensed under the MIT license.

shipu/laratie 适用场景与选型建议

shipu/laratie 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 8.52k 次下载、GitHub Stars 达 64, 最近一次更新时间为 2018 年 02 月 18 日, 在 PHP 生态内属于活跃度较高的组件。

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

围绕 shipu/laratie 我们能提供哪些服务?
定制开发 / 二次开发

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

BUG 修复 & 性能优化

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

项目外包 & 长期维护

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

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

统计信息

  • 总下载量: 8.52k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 64
  • 点击次数: 9
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 64
  • Watchers: 3
  • Forks: 13
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2018-02-18