国产+高潮+在线,国产 av 仑乱内谢,www国产亚洲精品久久,51国产偷自视频区视频,成人午夜精品网站在线观看

webman有類型laravel tinker的工具嗎

hon陳爍臨

webman有類型laravel tinker的工具嗎

習(xí)慣使用laravel tinker 調(diào)試代碼,webman有沒有類似方案?

1732 1 0
1個回答

hon陳爍臨

消滅0回答

使用 psy/psysh 簡單實現(xiàn)一個 tinker 命令 ,基本可用。 效果如下:
截圖

命令代碼如下:


namespace app\command;

use Psy\Configuration;
use Psy\Shell;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Output\OutputInterface;

class Tinker extends Command
{
    protected static $defaultName = 'tinker';
    protected static $defaultDescription = 'Interact with your application';

    /**
     * @return void
     */
    protected function configure()
    {
        $this->addArgument('name', InputArgument::OPTIONAL, 'Name description');
    }

    /**
     * @param InputInterface $input
     * @param OutputInterface $output
     * @return int
     */
    protected function execute(InputInterface $input, OutputInterface $output)
    {
        $this->getApplication()->setCatchExceptions(false);

        $config = new Configuration([
            'updateCheck' => 'never',
        ]);

        $shell = new Shell($config);
        // 通過命令參數(shù)傳入需要 include的文件路徑
        // $shell->setIncludes();

        try {
            $shell->run();
        } finally {
        }
    }
}
  • 暫無評論
年代過于久遠(yuǎn),無法發(fā)表回答
??