diff --git a/app/Recipes/Laravel/Commands/OpcacheStatus.php b/app/Recipes/Laravel/Commands/OpcacheStatus.php new file mode 100644 index 0000000..396259e --- /dev/null +++ b/app/Recipes/Laravel/Commands/OpcacheStatus.php @@ -0,0 +1,45 @@ +init($this->output); + + + if($this->option('scripts')){ + return $docker_service->service('php')->execute($terminal, [ + "php", + "/usr/bin/cachetool.phar", + "opcache:status:scripts", + ]); + } + + return $docker_service->service('php')->execute($terminal, [ + "php", + "/usr/bin/cachetool.phar", + "opcache:status", + ]); + } + } diff --git a/app/Recipes/Laravel/LaravelRecipe.php b/app/Recipes/Laravel/LaravelRecipe.php index c11a1b0..a3afcff 100644 --- a/app/Recipes/Laravel/LaravelRecipe.php +++ b/app/Recipes/Laravel/LaravelRecipe.php @@ -25,6 +25,7 @@ use App\Recipes\Laravel\Commands\Migrate; use App\Recipes\Laravel\Commands\Deploy; use App\Recipes\Laravel\Commands\OpcacheReset; +use App\Recipes\Laravel\Commands\OpcacheStatus; use App\Recipes\Laravel\Commands\Pest; use App\Recipes\Laravel\Commands\PestCoverage; use App\Recipes\Laravel\Commands\PhpCs; @@ -205,6 +206,7 @@ protected function recipe_commands(): array if (env('ENABLE_OPCACHE')) { $commands[] = OpcacheReset::class; + $commands[] = OpcacheStatus::class; } return $commands;