iguntur / laravel-artisan-database by guntur

Get the table records from artisan
174
5
2
Package Data
Maintainer Username: guntur
Maintainer Contact: poetra.guntur@gmail.com (Guntur Poetra)
Package Create Date: 2017-03-14
Package Last Update: 2017-03-14
Home Page:
Language: PHP
License: MIT
Last Refreshed: 2024-05-14 15:07:19
Package Statistics
Total Downloads: 174
Monthly Downloads: 0
Daily Downloads: 0
Total Stars: 5
Total Watchers: 2
Total Forks: 0
Total Open Issues: 0

Laravel Artisan Database Command

Get the table records from artisan

Prerequisites

Installation

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

Usage

Register Command

Update the app/Console/Kernel.php like this.

<?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

Contributions

  • Pull Requests and Issues: welcome

Please teach me for your PRs. :smile:

License

MIT © Guntur Poetra