承接 michaeljennings/laravel-make 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

michaeljennings/laravel-make

Composer 安装命令:

composer require michaeljennings/laravel-make

包简介

An application to make the laravel 'make' commands globally available.

关键字:

README 文档

README

This package allows you to use the laravel make commands outside of a laravel application, this can be very useful for package development.

Installing Globally

To install the package globally run composer global require michaeljennings/laravel-make.

When composer has finished installing you should be able to laravel-make in your command line and it should list all of the available commands.

If you are on windows and it says laravel-make is not a function then make sure your global composer .bin directory is in the $PATH environment variable.

Installing Per Project

To install on a per project basis run composer require michaeljennings/laravel-make.

Or add the package to you composer.json file.

{
  ...
  "require-dev": {
    "michaeljennings/laravel-make": "~1.0",
  },
  ...
}

Then run composer update to install the package.

Once installed run vendor/bin/laravel-make and you should see a list of all of the available commands.

Configuration

By default the laravel commands try to place the new files within the app directory and in the App namespace, however this is very rarely how a package is setup.

To get around this you can create a .laravel-make file in the root of your package and define your package specific configuration in it. This file works like a .env file, a sample file is below, and then there is a description of each configuration option underneath.

BASE_PATH=/src
BASE_NAMESPACE=Example\Package
USER_MODEL=Example\Package\Models\User

Base Path

The base path that will be prepended to all files, excluding migrations and seeders.

Defaults to /app

BASE_PATH=/src

Base Namespace

This is the root namespace that will be prepended to each class.

Defaults to 'App'

BASE_NAMESPACE=Example\Package

User Model

This option is a little strange. Some of the stubs need to the path to the user model for the application, by default laravel tries to find this from the auth config file. As we don't have the auth config file available to us we have to specify it in the .laravel-make file.

Defaults to 'App\User'

USER_MODEL=Example\Auth\Models\User

Console Command Path

The path the command files should be stored in. By default this will prepend the base path.

Defaults to '{BASE_PATH}/Console/Commands'

CONSOLE_COMMAND_PATH=src/Commands

Console Command Namespace

The namespace that will be prepended to all console commands.

Defaults to '{BASE_NAMESPACE}\Console\Commands'

CONSOLE_NAMESPACE=Example\Package\Commands

Controller Path

The path the controller files should be stored in. By default this will prepend the base path.

Defaults to '{BASE_PATH}/Http/Controllers'

CONTROLLER_PATH=src/Controllers

Controller Namespace

The namespace that will be prepended to all controllers.

Defaults to '{BASE_NAMESPACE}\Http\Controllers'

CONTROLLER_NAMESPACE=Example\Package\Controllers

Event Path

The path the event files should be stored in. By default this will prepend the base path.

Defaults to '{BASE_PATH}/Events'

EVENT_PATH=src/Events

Event Namespace

The namespace that will be prepended to all events.

Defaults to '{BASE_NAMESPACE}\Events'

EVENT_NAMESPACE=Example\Package\Events

Listener Path

The path the listener files should be stored in. By default this will prepend the base path.

Defaults to '{BASE_PATH}/Listeners'

LISTENER_PATH=src/Listeners

Listener Namespace

The namespace that will be prepended to all listeners.

Defaults to '{BASE_NAMESPACE}\Listeners'

LISTENER_NAMESPACE=Example\Package\Listeners

Mail Path

The path the mail files should be stored in. By default this will prepend the base path.

Defaults to '{BASE_PATH}/Mail'

MAIL_PATH=src/Mail

Mail Namespace

The namespace that will be prepended to all mail classes.

Defaults to '{BASE_NAMESPACE}\Mail'

MAIL_NAMESPACE=Example\Package\Mail

Middleware Path

The path the middleware files should be stored in. By default this will prepend the base path.

Defaults to '{BASE_PATH}/Middleware'

MIDDLWARE_PATH=src/Middleware

Middleware Namespace

The namespace that will be prepended to all middleware classes.

Defaults to '{BASE_NAMESPACE}\Middleware'

MIDDLWARE_NAMESPACE=Example\Package\Middleware

Migration Path

The path the migration files should be stored in. By default this will prepend the base path.

Defaults to 'database/migrations'

MIGRATION_PATH=migrations

Model Path

The path the model files should be stored in. By default this will prepend the base path.

Defaults to '{BASE_PATH}'

MODEL_PATH=src/Models

Model Namespace

The namespace that will be prepended to all models.

Defaults to '{BASE_NAMESPACE}\Models'

MODEL_NAMESPACE=Example\Package\Models

Notification Path

The path the notification files should be stored in. By default this will prepend the base path.

Defaults to '{BASE_PATH}/Notifications'

NOTIFICATION_PATH=src/Notifications

Notification Namespace

The namespace that will be prepended to all notifications.

Defaults to '{BASE_NAMESPACE}\Notifications'

NOTIFICATION_NAMESPACE=Example\Package\Notifications

Policy Path

The path the policy files should be stored in. By default this will prepend the base path.

Defaults to '{BASE_PATH}/Policies'

POLICY_PATH=src/Policies

Policy Namespace

The namespace that will be prepended to all policies.

Defaults to '{BASE_NAMESPACE}\Policies'

POLICY_NAMESPACE=Example\Package\Policies

Provider Path

The path the provider files should be stored in. By default this will prepend the base path.

Defaults to '{BASE_PATH}/Providers'

PROVIDER_PATH=src/Providers

Provider Namespace

The namespace that will be prepended to all providers.

Defaults to '{BASE_NAMESPACE}\Providers'

PROVIDER_NAMESPACE=Example\Package\Providers

Request Path

The path the request files should be stored in. By default this will prepend the base path.

Defaults to '{BASE_PATH}/Requests'

REQUEST_PATH=src/Requests

Request Namespace

The namespace that will be prepended to all requests.

Defaults to '{BASE_NAMESPACE}\Requests'

REQUEST_NAMESPACE=Example\Package\Requests

Seeder Path

The path the seeder files should be stored in. By default this will prepend the base path.

Defaults to 'database/seeds'

SEEDER_PATH=seeds

michaeljennings/laravel-make 适用场景与选型建议

michaeljennings/laravel-make 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 42 次下载、GitHub Stars 达 0, 最近一次更新时间为 2018 年 05 月 31 日, 在 PHP 生态内属于活跃度较高的组件。

它主要适用于以下技术方向: 「laravel」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。

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

围绕 michaeljennings/laravel-make 我们能提供哪些服务?
定制开发 / 二次开发

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

BUG 修复 & 性能优化

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

项目外包 & 长期维护

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

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

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2018-05-31