LaraNotes
  • 😍Welcome
  • 🤑Usefull Packages
    • Laravel Auth Log
    • Artisan UI Package
    • VSCODE Extension
    • Livewire Power Grid
    • Migration Generator
    • Larastarters
    • Dumper
    • Mailwind
    • Laravel Security
    • API Orion
    • Squire
    • Bladewind ui
    • Pint
    • Hydra
    • Laravel Markable
    • Chartify
  • 😎Tips
    • Laravel Queues
      • Jobs and Queues 101
    • Pagination
    • Eager Loading
    • First Contributions
    • Laravel Best Practices
    • Laravel Sail
    • Laravel Examples
    • Twitter login with breeze api
    • Deploy Laravel App on AWS
  • 👨‍💻Editor
    • Maool
    • Tinkerun
    • KIT
    • PHPSandbox
    • Starship
    • Laravel Cheat Sheet
Powered by GitBook
On this page
  • Introduction
  • Learn More
  1. Tips

Laravel Sail

Add PhpMyAdmin into laravel sail container

Introduction

Laravel Sail is a light-weight command-line interface for interacting with Laravel's default Docker development environment. Sail provides a great starting point for building a Laravel application using PHP, MySQL, and Redis without requiring prior Docker experience.

In this topic, we will talk about PhpMyAdmin Fan. While releasing laravel sail, PHPMyAdmin is not recommended in laravel sail. Some developers are not switched to TablePlus. So, you can add PHPMyAdmin into the laravel sail container. It's not Big Deal!. P.S - DRY.

1. Find Docker Compose

In your project root, find and open up docker-compose.yml and within the services block add the PHPMyAdmin service:

phpmyadmin:
    image: phpmyadmin/phpmyadmin
    links:
        - mysql:mysql
    ports:
        - 8080:80
    environment:
        MYSQL_USERNAME: "${DB_USERNAME}"
        MYSQL_ROOT_PASSWORD: "${DB_PASSWORD}"
        PMA_HOST: mysql
    networks:
        - sail

2. Sail it up

Now go back to the command line and bring back up your Sail container with: ./vendor/bin/sail up

3. Localhost

In your browser, navigate to localhost:8080 and PHPMyAdmin should load.

That's all! Hope it's worked. Enjoy your laravel sail.

Learn More

PreviousLaravel Best PracticesNextLaravel Examples

Last updated 3 years ago

😎
Laravel Sail - Laravel - The PHP Framework For Web Artisans
Logo