1. Go to this page and download the library: Download recca0120/terminal library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
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
],
];
// 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);
}
}
bash
$ vi server.php
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.