Laravel 项目安装
版本
0

一、什么是 Laravel Sail ?

Laravel Sail 是一个轻量级的命令行界面,用于与 Laravel的默认 Docker 配置进行交互。Sail 为使用 PHPMySQLRedis 构建 Laravel 应用程序提供了一个很好的起点,而无需之前的 Docker 经验。

对于laravel项目来说 Laravel Sail是他的一个扩展包,这个扩展包可以链接Docker完成一系列复杂的环境准备工作。

二、创建laravel项目

1. 进入Ubuntu

图片alt

然后找到自己的工作目录,我的工作目录是我本地电脑的:E:\koala_space\projects,对应到Ubuntu中是/mnt/e/koala_space/projects/,我们进入到此目录中。

cd /mnt/e/koala_space/projects/ # 进入工作目录 选择自己对应的目录即可

接下来,您已准备好创建您的第一个 Laravel项目。您可以使用一个简单的终端命令来创建一个新的 Laravel项目。例如,要在名为example-app的目录中创建一个新的 Laravel应用程序,您可以在终端中运行以下命令:

2. 项目安装

curl -s https://laravel.build/example-app | bash

当然,您可以将此 URL 中的example-app更改为您喜欢的任何内容。Laravel应用程序的目录将在您执行命令的目录中创建。

可以看到命令执行后首先会判断我们的环境是否可用,否则会帮我们自动配置好环境。

图片alt

执行过程如下:

koala@DESKTOP-3S233VK:/mnt/e/koala_space/projects$ curl -s https://laravel.build/example-app | bash
Unable to find image 'laravelsail/php81-composer:latest' locally
latest: Pulling from laravelsail/php81-composer
eff15d958d66: Pull complete
933427dc39f7: Pull complete
35bb08dc7ee2: Pull complete
58a3f26800d7: Pull complete
28803bfad74c: Pull complete
341a482d0bd3: Pull complete
03c4148389b1: Pull complete
fa3a9bfc7793: Pull complete
024907232600: Pull complete
df5987d70de6: Pull complete
e2a72a518bd8: Pull complete
b1ba689993c8: Pull complete
3bd142ab0b85: Pull complete
872fe34989f0: Pull complete
Digest: sha256:b27920b769ad8dc036a9ede3ae36f51a280d370ec7d125e77ca1924c9fa21dbb
Status: Downloaded newer image for laravelsail/php81-composer:latest

 _                               _
| |                             | |
| |     __ _ _ __ __ ___   _____| |
| |    / _` | '__/ _` \ \ / / _ \ |
| |___| (_| | | | (_| |\ V /  __/ |
|______\__,_|_|  \__,_| \_/ \___|_|

Warning: TTY mode requires /dev/tty to be read/writable.
    Creating a "laravel/laravel" project at "./example-app"
    Info from https://repo.packagist.org: #StandWithUkraine
    Installing laravel/laravel (v9.1.7)
      - Downloading laravel/laravel (v9.1.7)
      - Installing laravel/laravel (v9.1.7): Extracting archive
    Created project in /opt/example-app
    > @php -r "file_exists('.env') || copy('.env.example', '.env');"
    Loading composer repositories with package information
    Info from https://repo.packagist.org: #StandWithUkraine
    Updating dependencies
    Lock file operations: 108 installs, 0 updates, 0 removals
      - Locking brick/math (0.9.3)
  - Locking dflydev/dot-access-data (v3.0.1)
      - Locking doctrine/inflector (2.0.4)
  - Locking doctrine/instantiator (1.4.1)
  - Locking doctrine/lexer (1.2.3)
  - Locking dragonmantank/cron-expression (v3.3.1)
      - Locking egulias/email-validator (3.1.2)
  - Locking facade/ignition-contracts (1.0.2)
      - Locking fakerphp/faker (v1.19.0)
  - Locking filp/whoops (2.14.5)
  - Locking fruitcake/php-cors (v1.2.0)
      - Locking graham-campbell/result-type (v1.0.4)
  - Locking guzzlehttp/guzzle (7.4.2)
  - Locking guzzlehttp/promises (1.5.1)
      - Locking guzzlehttp/psr7 (2.2.1)
  - Locking hamcrest/hamcrest-php (v2.0.1)
      - Locking laravel/framework (v9.11.0)
      - Locking laravel/sail (v1.14.1)
      - Locking laravel/sanctum (v2.15.1)
      - Locking laravel/serializable-closure (v1.1.1)
  - Locking laravel/tinker (v2.7.2)
  - Locking league/commonmark (2.3.0)
      - Locking league/config (v1.1.1)
      - Locking league/flysystem (3.0.19)
      - Locking league/mime-type-detection (1.11.0)
  - Locking mockery/mockery (1.5.0)
      - Locking monolog/monolog (2.5.0)
  - Locking myclabs/deep-copy (1.11.0)
      - Locking nesbot/carbon (2.58.0)
      - Locking nette/schema (v1.2.2)
  - Locking nette/utils (v3.2.7)
  - Locking nikic/php-parser (v4.13.2)
  - Locking nunomaduro/collision (v6.2.0)
      - Locking phar-io/manifest (2.0.3)
  - Locking phar-io/version (3.2.1)
      - Locking phpdocumentor/reflection-common (2.2.0)
  - Locking phpdocumentor/reflection-docblock (5.3.0)
      - Locking phpdocumentor/type-resolver (1.6.1)
      - Locking phpoption/phpoption (1.8.1)
      - Locking phpspec/prophecy (v1.15.0)
      - Locking phpunit/php-code-coverage (9.2.15)
      - Locking phpunit/php-file-iterator (3.0.6)
      - Locking phpunit/php-invoker (3.1.1)
      - Locking phpunit/php-text-template (2.0.4)
  - Locking phpunit/php-timer (5.0.3)
  - Locking phpunit/phpunit (9.5.20)
      - Locking psr/container (2.0.2)
      - Locking psr/event-dispatcher (1.0.0)
      - Locking psr/http-client (1.0.1)
      - Locking psr/http-factory (1.0.1)
  - Locking psr/http-message (1.0.1)
  - Locking psr/log (3.0.0)
  - Locking psr/simple-cache (3.0.0)
      - Locking psy/psysh (v0.11.4)
  - Locking ralouphie/getallheaders (3.0.3)
      - Locking ramsey/collection (1.2.2)
      - Locking ramsey/uuid (4.3.1)
      - Locking sebastian/cli-parser (1.0.1)
      - Locking sebastian/code-unit (1.0.8)
  - Locking sebastian/code-unit-reverse-lookup (2.0.3)
  - Locking sebastian/comparator (4.0.6)
      - Locking sebastian/complexity (2.0.2)
      - Locking sebastian/diff (4.0.4)
      - Locking sebastian/environment (5.1.4)
  - Locking sebastian/exporter (4.0.4)
      - Locking sebastian/global-state (5.0.5)
      - Locking sebastian/lines-of-code (1.0.3)
  - Locking sebastian/object-enumerator (4.0.4)
  - Locking sebastian/object-reflector (2.0.4)
      - Locking sebastian/recursion-context (4.0.4)
      - Locking sebastian/resource-operations (3.0.3)
      - Locking sebastian/type (3.0.0)
      - Locking sebastian/version (3.0.2)
  - Locking spatie/backtrace (1.2.1)
  - Locking spatie/flare-client-php (1.1.0)
      - Locking spatie/ignition (1.2.9)
  - Locking spatie/laravel-ignition (1.2.3)
      - Locking symfony/console (v6.0.8)
  - Locking symfony/css-selector (v6.0.3)
  - Locking symfony/deprecation-contracts (v3.0.1)
      - Locking symfony/error-handler (v6.0.8)
      - Locking symfony/event-dispatcher (v6.0.3)
      - Locking symfony/event-dispatcher-contracts (v3.0.1)
      - Locking symfony/finder (v6.0.8)
  - Locking symfony/http-foundation (v6.0.8)
      - Locking symfony/http-kernel (v6.0.8)
      - Locking symfony/mailer (v6.0.8)
  - Locking symfony/mime (v6.0.8)
      - Locking symfony/polyfill-ctype (v1.25.0)
      - Locking symfony/polyfill-intl-grapheme (v1.25.0)
  - Locking symfony/polyfill-intl-idn (v1.25.0)
      - Locking symfony/polyfill-intl-normalizer (v1.25.0)
      - Locking symfony/polyfill-mbstring (v1.25.0)
      - Locking symfony/polyfill-php72 (v1.25.0)
  - Locking symfony/polyfill-php80 (v1.25.0)
      - Locking symfony/polyfill-php81 (v1.25.0)
      - Locking symfony/process (v6.0.8)
      - Locking symfony/routing (v6.0.8)
      - Locking symfony/service-contracts (v3.0.1)
      - Locking symfony/string (v6.0.8)
  - Locking symfony/translation (v6.0.8)
      - Locking symfony/translation-contracts (v3.0.1)
      - Locking symfony/var-dumper (v6.0.8)
      - Locking theseer/tokenizer (1.2.1)
  - Locking tijsverkoyen/css-to-inline-styles (2.2.4)
      - Locking vlucas/phpdotenv (v5.4.1)
      - Locking voku/portable-ascii (2.0.1)
      - Locking webmozart/assert (1.10.0)
    Writing lock file
    Installing dependencies from lock file (including require-dev)
    Package operations: 108 installs, 0 updates, 0 removals
      - Downloading doctrine/inflector (2.0.4)
      - Downloading doctrine/lexer (1.2.3)
      - Downloading symfony/polyfill-ctype (v1.25.0)
      - Downloading dragonmantank/cron-expression (v3.3.1)
      - Downloading symfony/deprecation-contracts (v3.0.1)
      - Downloading fakerphp/faker (v1.19.0)
      - Downloading symfony/polyfill-mbstring (v1.25.0)
      - Downloading symfony/http-foundation (v6.0.8)
      - Downloading fruitcake/php-cors (v1.2.0)
      - Downloading psr/http-message (1.0.1)
      - Downloading psr/http-client (1.0.1)
      - Downloading ralouphie/getallheaders (3.0.3)
      - Downloading psr/http-factory (1.0.1)
      - Downloading guzzlehttp/psr7 (2.2.1)
      - Downloading guzzlehttp/promises (1.5.1)
      - Downloading guzzlehttp/guzzle (7.4.2)
      - Downloading voku/portable-ascii (2.0.1)
      - Downloading symfony/polyfill-php80 (v1.25.0)
      - Downloading phpoption/phpoption (1.8.1)
      - Downloading graham-campbell/result-type (v1.0.4)
      - Downloading vlucas/phpdotenv (v5.4.1)
      - Downloading symfony/css-selector (v6.0.3)
      - Downloading tijsverkoyen/css-to-inline-styles (2.2.4)
      - Downloading symfony/var-dumper (v6.0.8)
      - Downloading symfony/routing (v6.0.8)
      - Downloading symfony/process (v6.0.8)
      - Downloading symfony/polyfill-php72 (v1.25.0)
      - Downloading symfony/polyfill-intl-idn (v1.25.0)
      - Downloading symfony/mime (v6.0.8)
      - Downloading symfony/service-contracts (v3.0.1)
      - Downloading psr/event-dispatcher (1.0.0)
      - Downloading symfony/event-dispatcher-contracts (v3.0.1)
      - Downloading symfony/event-dispatcher (v6.0.3)
      - Downloading psr/log (3.0.0)
      - Downloading egulias/email-validator (3.1.2)
      - Downloading symfony/mailer (v6.0.8)
      - Downloading symfony/error-handler (v6.0.8)
      - Downloading symfony/http-kernel (v6.0.8)
      - Downloading symfony/finder (v6.0.8)
      - Downloading symfony/polyfill-intl-grapheme (v1.25.0)
      - Downloading symfony/string (v6.0.8)
      - Downloading symfony/console (v6.0.8)
      - Downloading symfony/polyfill-php81 (v1.25.0)
      - Downloading ramsey/collection (1.2.2)
      - Downloading brick/math (0.9.3)
      - Downloading ramsey/uuid (4.3.1)
      - Downloading psr/simple-cache (3.0.0)
      - Downloading symfony/translation-contracts (v3.0.1)
      - Downloading symfony/translation (v6.0.8)
      - Downloading nesbot/carbon (2.58.0)
      - Downloading monolog/monolog (2.5.0)
      - Downloading league/mime-type-detection (1.11.0)
      - Downloading league/flysystem (3.0.19)
      - Downloading nette/utils (v3.2.7)
      - Downloading nette/schema (v1.2.2)
      - Downloading dflydev/dot-access-data (v3.0.1)
      - Downloading league/config (v1.1.1)
      - Downloading league/commonmark (2.3.0)
      - Downloading laravel/serializable-closure (v1.1.1)
      - Downloading laravel/framework (v9.11.0)
      - Downloading laravel/sail (v1.14.1)
      - Downloading laravel/sanctum (v2.15.1)
      - Downloading nikic/php-parser (v4.13.2)
      - Downloading psy/psysh (v0.11.4)
      - Downloading laravel/tinker (v2.7.2)
      - Downloading hamcrest/hamcrest-php (v2.0.1)
      - Downloading mockery/mockery (1.5.0)
      - Downloading filp/whoops (2.14.5)
      - Downloading facade/ignition-contracts (1.0.2)
      - Downloading nunomaduro/collision (v6.2.0)
      - Downloading phpdocumentor/type-resolver (1.6.1)
      - Downloading sebastian/type (3.0.0)
      - Downloading sebastian/global-state (5.0.5)
      - Downloading sebastian/environment (5.1.4)
      - Downloading phpunit/php-file-iterator (3.0.6)
      - Downloading phpunit/php-code-coverage (9.2.15)
      - Downloading doctrine/instantiator (1.4.1)
      - Downloading phpspec/prophecy (v1.15.0)
      - Downloading phar-io/version (3.2.1)
      - Downloading myclabs/deep-copy (1.11.0)
      - Downloading phpunit/phpunit (9.5.20)
      - Downloading spatie/backtrace (1.2.1)
      - Downloading spatie/flare-client-php (1.1.0)
      - Downloading spatie/ignition (1.2.9)
      - Downloading spatie/laravel-ignition (1.2.3)
    A connection timeout was encountered. If you intend to run Composer without connecting to the internet, run the command again prefixed with COMPOSER_DISABLE_NETWORK=1 to make Composer run in offline mode.
      - Downloading doctrine/inflector (2.0.4)
      - Downloading doctrine/lexer (1.2.3)
      - Downloading symfony/polyfill-ctype (v1.25.0)
      - Downloading dragonmantank/cron-expression (v3.3.1)
      - Downloading symfony/deprecation-contracts (v3.0.1)
      - Downloading fakerphp/faker (v1.19.0)
      - Downloading symfony/polyfill-mbstring (v1.25.0)
      - Downloading symfony/http-foundation (v6.0.8)
      - Installing doctrine/inflector (2.0.4): Extracting archive
      - Installing doctrine/lexer (1.2.3): Extracting archive
      - Installing symfony/polyfill-ctype (v1.25.0): Extracting archive
      - Installing webmozart/assert (1.10.0): Extracting archive
      - Installing dragonmantank/cron-expression (v3.3.1): Extracting archive
      - Installing symfony/deprecation-contracts (v3.0.1): Extracting archive
      - Installing psr/container (2.0.2): Extracting archive
      - Installing fakerphp/faker (v1.19.0): Extracting archive
      - Installing symfony/polyfill-mbstring (v1.25.0): Extracting archive
      - Installing symfony/http-foundation (v6.0.8): Extracting archive
      - Installing fruitcake/php-cors (v1.2.0): Extracting archive
      - Installing psr/http-message (1.0.1): Extracting archive
      - Installing psr/http-client (1.0.1): Extracting archive
      - Installing ralouphie/getallheaders (3.0.3): Extracting archive
      - Installing psr/http-factory (1.0.1): Extracting archive
      - Installing guzzlehttp/psr7 (2.2.1): Extracting archive
      - Installing guzzlehttp/promises (1.5.1): Extracting archive
      - Installing guzzlehttp/guzzle (7.4.2): Extracting archive
      - Installing voku/portable-ascii (2.0.1): Extracting archive
      - Installing symfony/polyfill-php80 (v1.25.0): Extracting archive
      - Installing phpoption/phpoption (1.8.1): Extracting archive
      - Installing graham-campbell/result-type (v1.0.4): Extracting archive
      - Installing vlucas/phpdotenv (v5.4.1): Extracting archive
      - Installing symfony/css-selector (v6.0.3): Extracting archive
      - Installing tijsverkoyen/css-to-inline-styles (2.2.4): Extracting archive
      - Installing symfony/var-dumper (v6.0.8): Extracting archive
      - Installing symfony/routing (v6.0.8): Extracting archive
      - Installing symfony/process (v6.0.8): Extracting archive
      - Installing symfony/polyfill-php72 (v1.25.0): Extracting archive
      - Installing symfony/polyfill-intl-normalizer (v1.25.0): Extracting archive
      - Installing symfony/polyfill-intl-idn (v1.25.0): Extracting archive
      - Installing symfony/mime (v6.0.8): Extracting archive
      - Installing symfony/service-contracts (v3.0.1): Extracting archive
      - Installing psr/event-dispatcher (1.0.0): Extracting archive
      - Installing symfony/event-dispatcher-contracts (v3.0.1): Extracting archive
      - Installing symfony/event-dispatcher (v6.0.3): Extracting archive
      - Installing psr/log (3.0.0): Extracting archive
      - Installing egulias/email-validator (3.1.2): Extracting archive
      - Installing symfony/mailer (v6.0.8): Extracting archive
      - Installing symfony/error-handler (v6.0.8): Extracting archive
      - Installing symfony/http-kernel (v6.0.8): Extracting archive
      - Installing symfony/finder (v6.0.8): Extracting archive
      - Installing symfony/polyfill-intl-grapheme (v1.25.0): Extracting archive
      - Installing symfony/string (v6.0.8): Extracting archive
      - Installing symfony/console (v6.0.8): Extracting archive
      - Installing symfony/polyfill-php81 (v1.25.0): Extracting archive
      - Installing ramsey/collection (1.2.2): Extracting archive
      - Installing brick/math (0.9.3): Extracting archive
      - Installing ramsey/uuid (4.3.1): Extracting archive
      - Installing psr/simple-cache (3.0.0): Extracting archive
      - Installing symfony/translation-contracts (v3.0.1): Extracting archive
      - Installing symfony/translation (v6.0.8): Extracting archive
      - Installing nesbot/carbon (2.58.0): Extracting archive
      - Installing monolog/monolog (2.5.0): Extracting archive
      - Installing league/mime-type-detection (1.11.0): Extracting archive
      - Installing league/flysystem (3.0.19): Extracting archive
      - Installing nette/utils (v3.2.7): Extracting archive
      - Installing nette/schema (v1.2.2): Extracting archive
      - Installing dflydev/dot-access-data (v3.0.1): Extracting archive
      - Installing league/config (v1.1.1): Extracting archive
      - Installing league/commonmark (2.3.0): Extracting archive
      - Installing laravel/serializable-closure (v1.1.1): Extracting archive
      - Installing laravel/framework (v9.11.0): Extracting archive
      - Installing laravel/sail (v1.14.1): Extracting archive
      - Installing laravel/sanctum (v2.15.1): Extracting archive
      - Installing nikic/php-parser (v4.13.2): Extracting archive
      - Installing psy/psysh (v0.11.4): Extracting archive
      - Installing laravel/tinker (v2.7.2): Extracting archive
      - Installing hamcrest/hamcrest-php (v2.0.1): Extracting archive
      - Installing mockery/mockery (1.5.0): Extracting archive
      - Installing filp/whoops (2.14.5): Extracting archive
      - Installing facade/ignition-contracts (1.0.2): Extracting archive
      - Installing nunomaduro/collision (v6.2.0): Extracting archive
      - Installing phpdocumentor/reflection-common (2.2.0): Extracting archive
      - Installing phpdocumentor/type-resolver (1.6.1): Extracting archive
      - Installing phpdocumentor/reflection-docblock (5.3.0): Extracting archive
      - Installing sebastian/version (3.0.2): Extracting archive
      - Installing sebastian/type (3.0.0): Extracting archive
      - Installing sebastian/resource-operations (3.0.3): Extracting archive
      - Installing sebastian/recursion-context (4.0.4): Extracting archive
      - Installing sebastian/object-reflector (2.0.4): Extracting archive
      - Installing sebastian/object-enumerator (4.0.4): Extracting archive
      - Installing sebastian/global-state (5.0.5): Extracting archive
      - Installing sebastian/exporter (4.0.4): Extracting archive
      - Installing sebastian/environment (5.1.4): Extracting archive
      - Installing sebastian/diff (4.0.4): Extracting archive
      - Installing sebastian/comparator (4.0.6): Extracting archive
      - Installing sebastian/code-unit (1.0.8): Extracting archive
      - Installing sebastian/cli-parser (1.0.1): Extracting archive
      - Installing phpunit/php-timer (5.0.3): Extracting archive
      - Installing phpunit/php-text-template (2.0.4): Extracting archive
      - Installing phpunit/php-invoker (3.1.1): Extracting archive
      - Installing phpunit/php-file-iterator (3.0.6): Extracting archive
      - Installing theseer/tokenizer (1.2.1): Extracting archive
      - Installing sebastian/lines-of-code (1.0.3): Extracting archive
      - Installing sebastian/complexity (2.0.2): Extracting archive
      - Installing sebastian/code-unit-reverse-lookup (2.0.3): Extracting archive
      - Installing phpunit/php-code-coverage (9.2.15): Extracting archive
      - Installing doctrine/instantiator (1.4.1): Extracting archive
      - Installing phpspec/prophecy (v1.15.0): Extracting archive
      - Installing phar-io/version (3.2.1): Extracting archive
      - Installing phar-io/manifest (2.0.3): Extracting archive
      - Installing myclabs/deep-copy (1.11.0): Extracting archive
      - Installing phpunit/phpunit (9.5.20): Extracting archive
      - Installing spatie/backtrace (1.2.1): Extracting archive
      - Installing spatie/flare-client-php (1.1.0): Extracting archive
      - Installing spatie/ignition (1.2.9): Extracting archive
      - Installing spatie/laravel-ignition (1.2.3): Extracting archive
    66 package suggestions were added by new dependencies, use `composer suggest` to see details.
    Generating optimized autoload files
    > Illuminate\Foundation\ComposerScripts::postAutoloadDump
    > @php artisan package:discover --ansi
    Discovered Package: laravel/sail
Discovered Package: laravel/sanctum
Discovered Package: laravel/tinker
Discovered Package: nesbot/carbon
Discovered Package: nunomaduro/collision
Discovered Package: spatie/laravel-ignition
Package manifest generated successfully.
    78 packages you are using are looking for funding.
Use the `composer fund` command to find out more!
    > @php artisan vendor:publish --tag=laravel-assets --ansi --force
    No publishable resources for tag [laravel-assets].
    Publishing complete.
    > @php artisan key:generate --ansi
    Application key set successfully.

Application ready! Build something amazing.
Sail scaffolding installed successfully.

Please provide your password so we can make some final adjustments to your application's permissions.

[sudo] password for koala:

Thank you! We hope you build something incredible. Dive in with: cd example-app && ./vendor/bin/sail up

项目目录结构

drwxrwxrwx 1 koala koala   4096 May  3 23:51 app/
drwxrwxrwx 1 koala koala   4096 May  3 23:51 bootstrap/
drwxrwxrwx 1 koala koala   4096 May  3 23:51 config/
drwxrwxrwx 1 koala koala   4096 May  3 23:51 database/
drwxrwxrwx 1 koala koala   4096 May  3 23:51 lang/
drwxrwxrwx 1 koala koala   4096 May 10 11:26 public/
drwxrwxrwx 1 koala koala   4096 May  3 23:51 resources/
drwxrwxrwx 1 koala koala   4096 May 10 14:01 routes/
drwxrwxrwx 1 koala koala   4096 May  3 23:51 storage/
drwxrwxrwx 1 koala koala   4096 May  3 23:51 tests/
drwxrwxrwx 1 koala koala   4096 May 10 09:35 vendor/
-rwxrwxrwx 1 koala koala   3958 May  3 23:51 README.md*
-rwxrwxrwx 1 koala koala   3100 May 10 14:12 docker-compose.yml* # docker 的配置文件
-rwxrwxrwx 1 koala koala   1707 May  3 23:51 composer.json*
-rwxrwxrwx 1 koala koala   1686 May  3 23:51 artisan*
-rwxrwxrwx 1 koala koala   1105 May 10 09:30 phpunit.xml*
-rwxrwxrwx 1 koala koala   1041 May 10 09:30 .env*
-rwxrwxrwx 1 koala koala    916 May 10 09:30 .env.example*
-rwxrwxrwx 1 koala koala    559 May  3 23:51 webpack.mix.js*
-rwxrwxrwx 1 koala koala    473 May  3 23:51 package.json*
-rwxrwxrwx 1 koala koala    258 May  3 23:51 .editorconfig*
-rwxrwxrwx 1 koala koala    179 May  3 23:51 .gitignore*
-rwxrwxrwx 1 koala koala    162 May  3 23:51 .styleci.yml*
-rwxrwxrwx 1 koala koala    152 May  3 23:51 .gitattributes*

3. 常用sail命令

./vendor/bin/sail up

4. 安装PHPmyadmin

打开根目录下的docker-compose.yml文件,在MySQL下面添加phpmyadmin的配置,之后重新执行启动命令

mysql:
.
.
.
phpmyadmin:
        image: 'phpmyadmin'
        ports:
            - '8081:80'
        networks:
            - sail
        environment:
            PMA_PASSWORD: '${DB_PASSWORD}'
            PMA_HOST: "mysql"
redis:
.
.
.

重启

./vendor/bin/sail up

访问:127.0.0.1:8081

图片alt

评论注意事项
讨论应以学习和精进为目的。请勿发布不友善或者负能量的内容,与人为善,比聪明更重要!

回复(0)