Skip to content
Home Sinan Eldem
Software

Laravel Valet

Sinan Eldem

• 3 min read

Laravel Valet

On May 5, 2016, Laravel creator Taylor Otwell announced a new server tool for developers who use MAC OSX as their web development environment: Valet

Built on top of the php70 and mariadb Brew packages and using DnsMasq for hosts management, this tool means you no longer really need tools like Homestead. Granted, Valet can't fully replace Homestead, but it is worth considering for its performance.

MariaDB, the MySQL server used with Valet, ships by default with the root username and an empty password. To help those who, like me, have been using Homestead for a long time, you can use the SQL statements below, which I prepared so you can keep using Homestead's standard credentials: they create a MySQL user account named homestead with the password secret and root privileges, which you can then use with Valet without any hassle.

Run the following in your SQL query window (PhpMyAdmin, Adminer, Navicat, Sequel Pro, etc.):

use mysql;

CREATE USER 'homestead'@'localhost' IDENTIFIED BY 'secret';
GRANT ALL PRIVILEGES ON *.* TO 'homestead'@'localhost' WITH GRANT OPTION;
CREATE USER 'homestead'@'%' IDENTIFIED BY 'secret';
GRANT ALL PRIVILEGES ON *.* TO 'homestead'@'%' WITH GRANT OPTION;
FLUSH PRIVILEGES;

Done!

You no longer need to change anything in your .env file.

For more information about Valet, take a look at the Valet documentation.

Happy coding.

Sinan Eldem

Custom software and AI solutions with Laravel

Related posts

Software
6 min read

Laravel Eloquent Relationships Quick Reference Guide

This quick reference is a practical guide that explains the most common relationship types with simple examples. Covering hasOne, hasMany, belongsTo, belongsToMany and polymorphic relationships along with eager loading and performance tips, it gives developers a fast and accurate reference.

Read more