定制 cwccode/laravel-contracts 二次开发

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

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

cwccode/laravel-contracts

最新稳定版本:v1.0.2

Composer 安装命令:

composer require cwccode/laravel-contracts

包简介

A Laravel artisan command to make interfaces

README 文档

README

cwccode/laravel-contracts is a package that adds a make:contract command to Laravel, to create interfaces for your application.

Installation

You can install the package using composer:

composer require --dev cwccode/laravel-contracts

For Laravel 5.4 or less, you'll need to register the service provider manually in /config/app.php

Usage

To make a new interface, simply run:

php artisan make:contract InterfaceName

This will produce the following file in app/Contracts/InterfaceName.php:

<?php

namespace App\Contracts;

interface InterfaceName
{
    //
}

You can also specify some methods by passing one or more --method options:

php artisan make:contract InterfaceName --method=method1 --method=method2

This will produce:

<?php

namespace App\Contracts;

interface InterfaceName
{
    /**
     * method1
     *
     * @return void
     */
    public function method1();

    /**
     * method2
     *
     * @return void
     */
    public function method2();
}

统计信息

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

GitHub 信息

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

其他信息

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