记录一下环境搭建
记录一下环境搭建
前提:需要将docker安装好;
#example-app这个名称可以改为其他的你想要的名称
curl -s "https://laravel.build/example-app" | bash
cd example-app
./vendor/bin/sail up
sail基本命令:
#采取后台的方式运行
./vendor/bin/sail up -d
#查看容器中php的版本
⇒ ./vendor/bin/sail php --version
PHP 8.2.1 (cli) (built: Jan 13 2023 10:43:08) (NTS)
Copyright (c) The PHP Group
Zend Engine v4.2.1, Copyright (c) Zend Technologies
with Zend OPcache v8.2.1, Copyright (c), by Zend Technologies
with Xdebug v3.2.0, Copyright (c) 2002-2022, by Derick Rethans
方便书写:
alias sail='[ -f sail ] && sh sail || sh vendor/bin/sail'
#示例:
⇒ sail shell
sail@3ec99872d7b3:/var/www/html$ php --version
PHP 8.2.1 (cli) (built: Jan 13 2023 10:43:08) (NTS)
Copyright (c) The PHP Group
本作品采用《CC 协议》,转载必须注明作者和本文链接