guntur/laravel-artisan-database

从 artisan 获取表格记录

v1.0.1 2017-03-14 04:02 UTC

This package is not auto-updated.

Last update: 2024-09-29 02:23:57 UTC


README

从 artisan 获取表格记录

先决条件

安装

$ composer require --dev 'guntur/laravel-artisan-database'

用法

注册命令

按照以下方式更新 app/Console/Kernel.php

<?php

namespace App\Console;

use Guntur\Artisan as Art;
use Illuminate\Console\Scheduling\Schedule;
use Illuminate\Foundation\Console\Kernel as ConsoleKernel;

class Kernel extends ConsoleKernel
{
    /**
     * The Artisan commands provided by your application.
     *
     * @var array
     */
    protected $commands = [
        Art\DatabaseTableCommand::class,
    ];

    // ...
}

Artisan

❯ php artisan db:table --help
Usage:
  db:table [options] [--] <table>

Arguments:
  table                  The table name

Options:
      --fields[=FIELDS]  Select with the specified field. Separate with `,` for multiple fields [default: "all"]
  -h, --help             Display this help message
  # ...

Help:
  Show the records of table

贡献

  • 拉取请求和问题:欢迎

请对我的 PR 提供建议。😄

许可协议

MIT © Guntur Poetra