Skip to content
This repository has been archived by the owner on Feb 28, 2022. It is now read-only.

iamalirezaj/laravel-terminal

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

18 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

Build Status Latest Stable Version Total Downloads Latest Unstable Version License

Laravel Terminal package

Run shell command easy in your laravel projects

The package is in process.

Requirement

  • Laravel ^6
  • PHP ^7.2

Install

Via Composer

$ composer require josh/laravel-terminal

Config

Add the following provider to providers part of config/app.php

Josh\Terminal\TerminalServiceProvider::class

and the following Facade to the aliases part

'Terminal' => Josh\Terminal\TerminalFacade::class

and then run

php artisan vendor:publish

for generating terminal config file into main config directory

Usage

You can run Terminal shell commands in laravel just like this:

$response = \Terminal::command('ls')->execute();

and you can get output of command just like this:

return $response->getBody()->getContents();

License

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