To install PHPMyAdmin in a Docker Container for Laravel Sail, Follow these steps:

  1. Stop your container with sail: $ sail stop
  2. Open docker-compose.yml
  3. After mailhog add the following property:
  4.     phpmyadmin:
            image: phpmyadmin/phpmyadmin
            restart: always
            depends_on:
                - mysql
            ports:
                - "8081:80"
            environment:
                PMA_HOST: mysql
                MYSQL_ROOT_PASSWORD: '${DB_PASSWORD}'
            networks:
                - sail
  5. Start the docker container again: $ sail up -d
  6. Open your browswer to: http://localhost:8081/index.php
  7. Done

Thats it!