mirror of
https://github.com/lkddi/nexusphp.git
synced 2026-04-24 03:57:22 +08:00
modal show global
This commit is contained in:
@@ -86,14 +86,9 @@ class Test extends Command
|
||||
*/
|
||||
public function handle()
|
||||
{
|
||||
add_filter('ttt', function ($d) {
|
||||
$d[] = 100;
|
||||
return $d;
|
||||
});
|
||||
$a = [];
|
||||
$a[] = '1';
|
||||
$a = apply_filter('ttt', $a);
|
||||
dd($a);
|
||||
$a = Carbon::parse('2022-08-06 23:08:03');
|
||||
$b = $a->clone()->addHours(1);
|
||||
dd($a, $b);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
<?php
|
||||
|
||||
namespace App\Console;
|
||||
|
||||
trait ExecuteCommandTrait
|
||||
{
|
||||
protected function executeCommand($command)
|
||||
{
|
||||
$this->info("Running $command ...");
|
||||
$result = exec($command, $output, $result_code);
|
||||
do_log(sprintf('command: %s, result_code: %s, output: %s, result: %s', $command, $result_code, json_encode($output), $result));
|
||||
if ($result_code != 0) {
|
||||
throw new \RuntimeException(json_encode($output));
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user