recca0120 / terminal
run laravel artisan command in web application
Installs: 388 875
Dependents: 3
Suggesters: 0
Security: 0
Stars: 858
Watchers: 20
Forks: 58
Open Issues: 18
Requires
- php: >=5.5.9
- illuminate/config: ^5.1|^6.0|^7.0|^8.0|^9.0|^10.0|^11.0
- illuminate/console: ^5.1|^6.0|^7.0|^8.0|^9.0|^10.0|^11.0
- illuminate/database: ^5.1|^6.0|^7.0|^8.0|^9.0|^10.0|^11.0
- illuminate/events: ^5.1|^6.0|^7.0|^8.0|^9.0|^10.0|^11.0
- illuminate/filesystem: ^5.1|^6.0|^7.0|^8.0|^9.0|^10.0|^11.0
- illuminate/routing: ^5.1|^6.0|^7.0|^8.0|^9.0|^10.0|^11.0
- illuminate/view: ^5.1|^6.0|^7.0|^8.0|^9.0|^10.0|^11.0
- symfony/finder: ^2.7|^3.0|^4.0|^5.0|^6.0|^7.0
- webmozart/glob: ^4.1
Requires (Dev)
- mikey179/vfsstream: ^1.6
- mockery/mockery: ^0.9.4|^1.0
- nesbot/carbon: ^1.20|^2.0|^3.0
- phpunit/phpunit: ^4.8|^5.1|^6.1|^7.0|^8.0|^9.0|^10.0|^11.0
- roave/security-advisories: dev-latest
- vlucas/phpdotenv: ^4.0|^5.1
- dev-master
- v1.12.2
- v1.12.1
- v1.12.0
- v1.11.0
- v1.10.0
- v1.9.1
- v1.9.0
- v1.8.0
- v1.7.0
- v1.6.30
- v1.6.29
- v1.6.28
- v1.6.27
- v1.6.26
- v1.6.25
- v1.6.24
- v1.6.23
- v1.6.22
- v1.6.21
- v1.6.20
- v1.6.19
- v1.6.18
- v1.6.17
- v1.6.16
- v1.6.15
- v1.6.14
- v1.6.13
- v1.6.12
- v1.6.11
- v1.6.10
- v1.6.9
- v1.6.8
- v1.6.7
- v1.6.6
- v1.6.5
- v1.6.4
- v1.6.3
- v1.6.2
- v1.6.0
- v1.5.13
- v1.5.12
- v1.5.11
- v1.5.10
- v1.5.9
- v1.5.8
- v1.5.7
- v1.5.6
- v1.5.5
- v1.5.4
- v1.5.2
- v1.5.1
- v1.5.0
- 1.4.x-dev
- v1.4.2
- v1.4.1
- v1.4.0
- v1.3.11
- v1.3.10
- v1.3.9
- v1.3.8
- v1.3.7
- v1.3.6
- v1.3.4
- v1.3.3
- v1.3.0
- v1.2.11
- v1.2.8
- v1.2.7
- v1.2.6
- v1.2.3
- v1.1.3
- v1.1.0
- v0.0.9
- v0.0.8
- v0.0.7
- v0.0.6
- v0.0.4
- v0.0.3
- dev-dependabot/npm_and_yarn/elliptic-6.6.0
- dev-dependabot/npm_and_yarn/webpack-5.95.0
- dev-dependabot/npm_and_yarn/multi-8e7cca3efd
- dev-dependabot/npm_and_yarn/multi-cb3997355f
- dev-dependabot/npm_and_yarn/multi-8349124f81
- dev-dependabot/npm_and_yarn/multi-2c5a3fe122
- dev-dependabot/npm_and_yarn/multi-9423f4c335
- dev-dependabot/npm_and_yarn/postcss-8.4.41
- dev-dependabot/npm_and_yarn/multi-5a796cd6e7
- dev-dependabot/npm_and_yarn/braces-3.0.3
- dev-dependabot/npm_and_yarn/browserify-sign-4.2.3
- dev-laravel50
- dev-laravel-kernel
- dev-develop
This package is auto-updated.
Last update: 2024-11-29 20:23:42 UTC
README
Laravel Terminal
Installation
composer require recca0120/terminal --dev
OR
Add Presenter to your composer.json file:
"require-dev": { "recca0120/terminal": "^1.6.8" }
Now, run a composer update on the command line from the root of your project:
composer update
Registering the Package
Include the service provider within app/config/app.php
. The service povider is needed for the generator artisan command.
'providers' => [ ... Recca0120\Terminal\TerminalServiceProvider::class, ... ];
publish
artisan vendor:publish --provider="Recca0120\Terminal\TerminalServiceProvider"
URL
http://localhost/path/to/terminal
config
return [ 'enabled' => env('APP_DEBUG'), 'whitelists' => ['127.0.0.1', 'your ip'], 'route' => [ 'prefix' => 'terminal', 'as' => 'terminal.', // if you use laravel 5.1, remember to remove web middleware 'middleware' => ['web'], // if you need auth, you need use web and auth middleware // 'middleware' => ['web', 'auth'] ], 'commands' => [ \Recca0120\Terminal\Console\Commands\Artisan::class, \Recca0120\Terminal\Console\Commands\ArtisanTinker::class, \Recca0120\Terminal\Console\Commands\Cleanup::class, \Recca0120\Terminal\Console\Commands\Find::class, \Recca0120\Terminal\Console\Commands\Mysql::class, \Recca0120\Terminal\Console\Commands\Tail::class, \Recca0120\Terminal\Console\Commands\Vi::class, // add your command ], ];
Available Commands
- artisan
- artisan tinker
- find
- mysql
- tail
- vi
Find
not full support, but you can delete file use this function (please check file permission)
find ./vendor -name tests -type d -maxdepth 4 -delete
Add Your Command
Add Command Class
// src/Console/Commands/Mysql.php namespace Recca0120\Terminal\Console\Commands; use Illuminate\Console\Command; use Illuminate\Foundation\Inspiring; use Recca0120\Terminal\Contracts\TerminalCommand; class Inspire extends Command implements TerminalCommand { /** * The name and signature of the console command. * * @var string */ protected $signature = 'inspire'; /** * The console command description. * * @var string */ protected $description = 'Display an inspiring quote'; /** * Execute the console command. * * @return mixed */ public function handle() { $this->comment(PHP_EOL.Inspiring::quote().PHP_EOL); } }
ScreenShot
Available Commands
$ help
Artisan List
$ artisan
Migrate
$ artisan migrate --seed
Artisan Tinker
$ artisan tinker
MySQL
$ mysql mysql> select * from users; # change connection mysql> use sqlite; mysql> select * from users;
Find Command
$ find ./ -name * -maxdepth 1
Find and Delete
$ find ./storage/logs -name * -maxdepth 1 -delete
Vi
$ vi server.php
Tail
$ tail $ tail --line=1 $ tail server.php $ tail server.php --line 5
Cleanup
$ cleanup