Download the PHP package sukohi/white-sheet without Composer

On this page you can find all versions of the php package sukohi/white-sheet. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package white-sheet

WhiteSheet

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

[Commands]:

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

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

or

php artisan db:code App\\User array

GENERATING_TYPEs

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)

<!-- Empty -->
<input type="text" name="id" value="">
<input type="text" name="name" value="">
<input type="text" name="email" value="">
<input type="text" name="password" value="">
<input type="text" name="remember_token" value="">
<input type="text" name="created_at" value="">
<input type="text" name="updated_at" value="">

<!-- with Values -->
<input type="text" name="id" value="{{ $user->id }}">
<input type="text" name="name" value="{{ $user->name }}">
<input type="text" name="email" value="{{ $user->email }}">
<input type="text" name="password" value="{{ $user->password }}">
<input type="text" name="remember_token" value="{{ $user->remember_token }}">
<input type="text" name="created_at" value="{{ $user->created_at }}">
<input type="text" name="updated_at" value="{{ $user->updated_at }}">

<!-- Vue -->
<input type="text" name="id" v-model="id">
<input type="text" name="name" v-model="name">
<input type="text" name="email" v-model="email">
<input type="text" name="password" v-model="password">
<input type="text" name="remember_token" v-model="rememberToken">
<input type="text" name="created_at" v-model="createdAt">
<input type="text" name="updated_at" v-model="updatedAt">

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

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

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

php artisan db:count TABLE_NAME

e.g.)

php artisan db:count items

/* Output

    [ items ]: 12345 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]:

License

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


All versions of white-sheet with dependencies

PHP Build Version
Package Version
Requires laravel/framework Version ~5.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package sukohi/white-sheet contains the following files

Loading the files please wait ....