Step 1) Install Brew
Ref: https://brew.sh/
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
Step 2) Install PHP
brew install php
To install a specific version
brew install php@8.1
To make a specific php version as default:
brew link --overwrite --force php@8.1
Step 3) Install PHP Extensions
brew tap shivammathur/php
brew tap shivammathur/extensions
Eg: Install imap
brew install imap@8.1
To verify run:
php -m
Step 4) Install Composer
brew install composer
Step 5) Install Laravel Valet
Ref: https://laravel.com/docs/10.x/valet
composer global require laravel/valet
valet install
To change the default version of valet:
valet use php@8.1
To verify:
valet php -v
To install composer packages in a project root directory, run
valet composer install
then run
valet link
Now, you can visit: http://<project-directory>.test
, it should render default page.
Step 6) MySql Database
Install DBngin from https://dbngin.com/
Step 7) Install PhpMyAdmin
- Download https://www.phpmyadmin.net/downloads/
- Unzip and setup site using
Laravel Valet
- Open
config.inc.php
- Update following:
$cfg['blowfish_secret'] = ''; //some random key
$cfg['Servers'][$i]['auth_type'] = 'cookie';
$cfg['Servers'][$i]['host'] = '127.0.0.1';
$cfg['Servers'][$i]['AllowNoPassword'] = true;
Try to open and login.
Or you can also install https://apps.apple.com/us/app/sequel-ace/id1518036000?mt=12
Top comments (1)
Have you tried ServBay.dev?
It's a much easier tool for PHP developers, providing a user-friendly experience, especially for beginners. It supports all versions of PHP, MariaDB, PostgreSQL, as well as Redis and Memcached. You can run multiple PHP instances simultaneously and switch between them effortlessly. It also offers easy updates without the need to configure environment variables. This tool has greatly simplified my PHP development and is definitely worth trying!