ayoubaitouhmad / LARAVEL_SHELL_EXECUTOR

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Laravel Shell Executor

Usage

Init

  copy class to your peject folder 
  Ex : app/services/ShellExecutor.php

Change namespace

  App\Helpers => YourNameSpace
  Ex : namespace App\Services

Bind class with the service container

  Go to AppServiceProvider 
  inside the boot function 
  add this code bellow 
$this->app->singleton(ShellExecutor::class, function () {
            return new ShellExecutor( realpath(__DIR__ . '/../../'));
});

About

License:MIT License