2017 © Pedro Peláez
 

library xin-artisan

the "xin" command for Laravel artisan.

image

petehouston/xin-artisan

the "xin" command for Laravel artisan.

  • Friday, July 29, 2016
  • by petehouston
  • Repository
  • 1 Watchers
  • 4 Stars
  • 4 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 2 Forks
  • 0 Open issues
  • 4 Versions
  • 0 % Grown

The README.md

Xin for Artisan command

Latest Version on Packagist ![Software License][ico-license], (*1)

Xin Logo, (*2)

Xin, in Vietnamese, is to "ask for something on demand". Now, you can xin something right into Laravel Artisan console., (*3)

Install

Via Composer, (*4)

``` bash $ composer require petehouston/xin-artisan, (*5)


### Setup Append this line to `$providers` variable on `config/app.php` file:
'providers' => [
    ...
    Petehouston\Xin\XinServiceProvider::class,
]

### Configuration You need to add xin config file `xin.php` to your project:

$ php artisan vendor:publish --provider="Petehouston\Xin\XinServiceProvider" --tag=config, (*6)


**Some config variables for use:** * `browser.bin`: the absolute path to the browser binary you want to use. Default, xin will automatically look up for you. ## Command list Following commands are supported: * [xin:ip](#ask-for-ip-address): get IP address. * [xin:docs](#open-a-laravel-documentation-section): read Laravel documentation. * [xin:log](#play-with-log-files): play around with log files. * [xin:gist](#share-code-via-gist): Share code via public Gist. * [xin:view](#create-empty-blade-view): create empty Blade view. ## Usage ### Ask for IP address **Get local IP address:**

$ php artisan xin:ip Local IP address is: 192.168.100.3, (*7)


**Get public/external IP address:**

$ php artisan xin:ip --public External IP address is: 13.66.202.129, (*8)


### Open a Laravel documentation section **List all available Laravel documentation sections:**

$ php artisan xin:docs list, (*9)

All of Laravel documentation sections are listed below: +----------------------------+-------------------------+ | Section | Key | +----------------------------+-------------------------+ | Release Notes | releases | | Upgrade Guide | upgrade | | Contribution Guide | contributions | | Installation | installation | | Configuration | configuration | | Homestead | homestead | | Valet | valet | | Basic Task List | quickstart | | Intermediate Task List | quickstart-intermediate | | Routing | routing | | Middleware | middleware | | Controllers | controllers | | Requests | requests | | Responses | responses | | Views | views | | Blade Templates | blade | | Request Lifecycle | lifecycle | | Application Structure | structure | | Service Providers | providers | | Service Container | container | | Contracts | contracts | | Facades | facades | | Authentication | authentication | | Authorization | authorization | | Artisan Console | artisan | | Billing | billing | | Cache | cache | | Collections | collections | | Elixir | elixir | | Encryption | encryption | | Errors & Loggin | errors | | Events | events | | Filesystem & Cloud Storage | filesystem | | Hashing | hashing | | Helpers | helpers | | Localization | localization | | Mail | mail | | Package Development | packages | | Pagination | pagination | | Queues | queues | | Redis | redis | | Session | session | | SSH Tasks | envoy | | Task Scheduling | scheduling | | Testing | testing | | Validation | validation | | Database - Getting Started | database | | Query Builder | queries | | Migrations | migrations | | seeding | seeding | | Eloquent - Getting Started | eloquent | | Relationships | eloquent-relationships | | Eloquent Collections | eloquent-collections | | Mutators | eloquent-mutators | | Eloquent Serialization | eloquent-serialization | +----------------------------+-------------------------+, (*10)


**Open the section on browser:** Xin will use the default system browser to open URL. Key is the value available from "list".

$ php artisan xin:docs read --key=envoy, (*11)


**Open documentation in different languages:** Use `--locale` option. Currently, only "en" and "vn" are supported. Default is "en".

$ php artisan xin:docs read --key=structure --locale=vn, (*12)


### Play with log files All logs are stored under `storage/logs` directory. **Read log file** The default log file is `laravel.log`.

$ php artisan xin:log, (*13)


You can read content of different log files by name:

$ php artisan xin:log --name=custom.log, (*14)


**Clean log file content**

$ php artisan xin:log --clean, (*15)


The log file will be empty. You can combine clean a custom log file:

$ php artisan xin:log --name=custom.log --clean, (*16)


**Remove all logs**

$ php artisan xin:log --remove-all, (*17)


This command will remove all files in `storage/logs` directory. ### Share code via Gist This command will share a source file to public Gist. It will response with **Gist Id** and **Gist Url**.

$ php artisan xin:gist [filename] --desc="Sharing description.", (*18)


For example, if you want to share `public/index.php` file:

$ php artisan xin:gist public/index.php --desc="Sharing Laravel index file.", (*19)

Gist Sharing Information

Gist Id: 37c55c18cd63c34195c22fafbff6fe16 Gist Url: https://gist.github.com/37c55c18cd63c34195c22fafbff6fe16, (*20)


**Note:** on Windows, since the path separator is `\`, so you need to wrap the `filename` with double-quotation mark `"` like this:

$ php artisan xin:gist "public\index.php", (*21)


### Create empty Blade view Wanna create Blade view file from command quickly? Use this:

$ php artisan xin:view admin.auth.login, (*22)


It will create `login.blade.php` at `resources/views/admin/auth`, it also does create any directory that doesn't exist in the path. Apparently, in Linux/Unix/Mac, you can use `touch`.

$ mkdir resources/views/admin/auth $ touch resources/views/admin/auth/login.blade.php ```, (*23)

License

The MIT License (MIT). Please see License File for more information., (*24)

The Versions

29/07 2016

dev-master

9999999-dev https://github.com/petehouston/xin-artisan

the "xin" command for Laravel artisan.

  Sources   Download

MIT

The Requires

 

php artisan laravel 5 xin xin-artisan

03/06 2016

1.2.0

1.2.0.0 https://github.com/petehouston/xin-artisan

the "xin" command for Laravel artisan.

  Sources   Download

MIT

The Requires

 

php artisan laravel 5 xin xin-artisan

03/06 2016

1.1.0

1.1.0.0 https://github.com/petehouston/xin-artisan

the "xin" command for Laravel artisan.

  Sources   Download

MIT

The Requires

 

php artisan laravel 5 xin xin-artisan

03/06 2016

1.0.0

1.0.0.0 https://github.com/petehouston/xin-artisan

the "xin" command for Laravel artisan.

  Sources   Download

MIT

The Requires

 

php artisan laravel 5 xin xin-artisan