PHPackages                             sukohi/white-sheet - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [CLI &amp; Console](/categories/cli)
4. /
5. sukohi/white-sheet

ActiveLibrary[CLI &amp; Console](/categories/cli)

sukohi/white-sheet
==================

A Laravel package to get many kinds of DB information through command line.

1.0.3(8y ago)022MITPHP

Since Jul 8Pushed 8y ago1 watchersCompare

[ Source](https://github.com/SUKOHI/WhiteSheet)[ Packagist](https://packagist.org/packages/sukohi/white-sheet)[ RSS](/packages/sukohi-white-sheet/feed)WikiDiscussions master Synced yesterday

READMEChangelogDependencies (1)Versions (6)Used By (0)

WhiteSheet
==========

[](#whitesheet)

A Laravel package to get many kinds of DB information through command line.
(This package is maintained under L5.4)

\[Commands\]:

- `db:code` : Generate code
- `db:find` : Find column or table
- `db:fields` : Show fields
- `db:count` : Show rows
- `db:tail` : Show the newest tables or rows

Installation
============

[](#installation)

Execute the next command.

```
composer require sukohi/white-sheet:1.*

```

Set the service providers in app.php

```
'providers' => [
    ...Others...,
    Sukohi\WhiteSheet\WhiteSheetServiceProvider::class,
]

```

Now you have this package's commands in `php artisan` commands.

Usage
=====

[](#usage)

1. Generate code
----------------

[](#1-generate-code)

**Basic**

You need to set two arguments to run this package like so.

```
php artisan db:code (Model) (SHOWING_TYPE)

```

(e.g.)

```
php artisan db:code User array

```

- In this case, User means `App\User`.

or

```
php artisan db:code App\\User array

```

GENERATING\_TYPEs

- array
- rule
- getter
- setter
- request
- js
- seed
- html
- accessor
- mutator

**array**

```
php artisan db:code User array

```

(output)

```
$array = [
    'id' => 'id',
    'name' => 'name',
    'email' => 'email',
    'password' => 'password',
    'remember_token' => 'remember_token',
    'created_at' => 'created_at',
    'updated_at' => 'updated_at',
];

```

**rule**

```
php artisan db:code User rule

```

(output)

```
return [
    'id' => 'required',
    'name' => 'required',
    'email' => 'required',
    'password' => 'required',
    'remember_token' => 'required',
    'created_at' => 'required',
    'updated_at' => 'required',
];

```

**getter**

```
php artisan db:code User getter

```

(output)

```
$id = $user->id;
$name = $user->name;
$email = $user->email;
$password = $user->password;
$remember_token = $user->remember_token;
$created_at = $user->created_at;
$updated_at = $user->updated_at;
$created_on = $user->created_on;

```

Note: Output code is including accessors.

**setter**

```
php artisan db:code User setter

```

(output)

```
// Variable
$user = new \App\User();
$user->id = $id;
$user->name = $name;
$user->email = $email;
$user->password = $password;
$user->remember_token = $remember_token;
$user->created_at = $created_at;
$user->updated_at = $updated_at;
$user->created_on = $created_on;
$user->save();

// Request
$user = new \App\User();
$user->id = $request->id;
$user->name = $request->name;
$user->email = $request->email;
$user->password = $request->password;
$user->remember_token = $request->remember_token;
$user->created_at = $request->created_at;
$user->updated_at = $request->updated_at;
$user->created_on = $request->created_on;
$user->save();

```

Note: Output code is including mutators.

**request**

```
php artisan db:code User request

```

(output)

```
$id = $request->id;
$name = $request->name;
$email = $request->email;
$password = $request->password;
$remember_token = $request->remember_token;
$created_at = $request->created_at;
$updated_at = $request->updated_at;

```

**js**

```
php artisan db:code User js

```

(output)

```
// Basic
var id = user.id;
var name = user.name;
var email = user.email;
var password = user.password;
var providerName = user.providerName;
var providerId = user.providerId;
var rememberToken = user.rememberToken;
var createdAt = user.createdAt;
var updatedAt = user.updatedAt;

// Vue
this.id = user.id;
this.name = user.name;
this.email = user.email;
this.password = user.password;
this.providerName = user.providerName;
this.providerId = user.providerId;
this.rememberToken = user.rememberToken;
this.createdAt = user.createdAt;
this.updatedAt = user.updatedAt;

```

**seed**

```
php artisan db:code User seed

```

(output)

```
$user = new \App\User();
$user->name = $request->name;
$user->email = $request->email;
$user->password = $request->password;
$user->remember_token = $request->remember_token;
$user->created_on = $request->created_on;
$user->save();

```

**html**

```
php artisan db:code User html

```

(output)

```

```

**Accessor**

```
php artisan db:code User accessor

```

(Output)

```
public function getIdAttribute($value) {

    return $value;

}
public function getNameAttribute($value) {

    return $value;

}
public function getEmailAttribute($value) {

    return $value;

}
public function getPasswordAttribute($value) {

    return $value;

}
public function getProviderNameAttribute($value) {

    return $value;

}
public function getProviderIdAttribute($value) {

    return $value;

}
public function getRememberTokenAttribute($value) {

    return $value;

}
public function getCreatedAtAttribute($value) {

    return $value;

}
public function getUpdatedAtAttribute($value) {

    return $value;

}

```

**Mutator**

```
php artisan db:code User mutator

```

(Output)

```
public function setIdAttribute($value) {

    $this->attributes['id'] = $value;

}
public function setNameAttribute($value) {

    $this->attributes['name'] = $value;

}
public function setEmailAttribute($value) {

    $this->attributes['email'] = $value;

}
public function setPasswordAttribute($value) {

    $this->attributes['password'] = $value;

}
public function setProviderNameAttribute($value) {

    $this->attributes['provider_name'] = $value;

}
public function setProviderIdAttribute($value) {

    $this->attributes['provider_id'] = $value;

}
public function setRememberTokenAttribute($value) {

    $this->attributes['remember_token'] = $value;

}
public function setCreatedAtAttribute($value) {

    $this->attributes['created_at'] = $value;

}
public function setUpdatedAtAttribute($value) {

    $this->attributes['updated_at'] = $value;

}

```

2. Find column or table
-----------------------

[](#2-find-column-or-table)

```
php artisan db:find SEARCH_KEYWORD

```

e.g.)

```
php artisan db:find user

/* Output

    [ authors ]:
     - created_user_id
     - updated_user_id

    [ users ]:

*/

```

3. Show fields
--------------

[](#3-show-fields)

```
php artisan db:fields TABLE_NAME

```

e.g.)

```
php artisan db:fields users

/* Output

    [ users ]:
     - id
     - name
     - email
     - password
     - provider_name
     - provider_id
     - remember_token
     - created_at
     - updated_at

*/

```

4. Show rows
------------

[](#4-show-rows)

```
php artisan db:count TABLE_NAME

```

e.g.)

```
php artisan db:count items

/* Output

    [ items ]: 12345 rows

*/

```

4. Show the newest tables or rows
---------------------------------

[](#4-show-the-newest-tables-or-rows)

(for Tables)

```
php artisan db:tail

/* Output

    2017-07-01 15:11:59 : [ users ]
    2017-07-09 18:20:59 : [ users ]
    2017-07-09 18:30:00 : [ movies ]
    2017-07-09 18:31:00 : [ songs ]
    2017-07-09 18:34:00 : [ songs ]

*/

```

(for Rows)

```
php artisan db:tail TABLE_NAME

/* Output

    [ songs ]:
     - 2017-07-01 15:11:59 (ID: 208)
     - 2017-07-01 15:11:59 (ID: 202)
     - 2017-07-01 15:11:59 (ID: 203)
     - 2017-07-09 18:31:00 (ID: 204)
     - 2017-07-09 18:34:00 (ID: 205)

*/

```

\[options\]:

- --limit, -l : How many lines do you want to show? Default is 5.

License
=======

[](#license)

This package is licensed under the MIT License.
Copyright 2017 Sukohi Kuhoh

###  Health Score

28

—

LowBetter than 52% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity67

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

5

Last Release

3278d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/2980d59b309d45df3f2e6e51b1d336614da063240b8f76f873f287cd745ec5db?d=identicon)[Sukohi](/maintainers/Sukohi)

---

Top Contributors

[![SUKOHI](https://avatars.githubusercontent.com/u/5362394?v=4)](https://github.com/SUKOHI "SUKOHI (8 commits)")

### Embed Badge

![Health badge](/badges/sukohi-white-sheet/health.svg)

```
[![Health](https://phpackages.com/badges/sukohi-white-sheet/health.svg)](https://phpackages.com/packages/sukohi-white-sheet)
```

###  Alternatives

[statamic-rad-pack/runway

Eloquently manage your database models in Statamic.

135212.4k7](/packages/statamic-rad-pack-runway)[ronasit/laravel-entity-generator

Provided console command for generating entities.

2052.5k](/packages/ronasit-laravel-entity-generator)[ecotone/laravel

Ecotone for Laravel — CQRS, Event Sourcing, Sagas, Durable Workflows, and Outbox on top of Laravel Queue, via PHP attributes.

21313.7k3](/packages/ecotone-laravel)[acdphp/laravel-schedule-police

Stop, start or execute scheduled commands from a simple dashboard without redeploying, while maintaining the visibility, control, and reviewability of the configurations in your codebase.

5121.3k](/packages/acdphp-laravel-schedule-police)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
