Sites

Herd uses the concept of parked paths and linked directories for serving sites. You can access every site in a parked path via http://<directory-name>.test. By default, Herd will automatically park the %USERPROFILE%\Herd directory for you. Any PHP application in this directory is automatically available via its .test domain. If you have other locations for your projects, you can add them as parked paths in the general settings or link individual projects as a linked directory.

Aside from Laravel, Herd supports many frameworks and applications out-of-the-box. If your framework is not in the list, you can create a custom driver to run it with Herd.

Creating your first site

The fastest way to manage your sites and to create new applications is the command line.

Command Prompt (CMD)

cd %USERPROFILE%\Herd
laravel new my-project
cd my-project
herd open
herd edit

Powershell

Set-Location -Path "$env:USERPROFILE\Herd"
laravel new my-project
cd my-project
herd open
herd edit

These commands go into your Herd directory, create a brand-new Laravel application and open it in your browser. The herd edit command even opens your favorite IDE if you’ve set up the protocols.

Linking an existing site

You can link an existing site with a specific domain via the link command from any directory on your machine. The link command uses the directory name as domain name if you don’t set additional parameters.

Command Prompt (CMD)

cd %USERPROFILE%\Herd\your-project
herd link
herd link custom-domain

Powershell

Set-Location -Path "$env:USERPROFILE\Herd\your-project"
herd link
herd link custom-domain

These commands create Herd configurations, add the domains to your hosts file, and you can now access the application via your-project.test and custom-domain.test. This is useful if you want to use an application from multiple domains, for example in multi-tenancy environments or if you store all your projects across multiple directories.

Via the GUI

If you prefer creating and linking sites via a graphical user interface, you can use Herd’s site wizard to create new Laravel applications or link existing projects.

You can start the site wizard by opening the Site Manager from the Herd dashboard or the system tray icon.

Unlinking an existing site

You may remove a previously created link, by using the unlink command from any directory on your machine. The unlink command uses the directory name as domain name if you don’t set additional parameters.

Command Prompt (CMD)

cd %USERPROFILE%\Herd\your-project
herd unlink
herd unlink custom-domain

Powershell

Set-Location -Path "$env:USERPROFILE\Herd\your-project"
herd unlink
herd unlink custom-domain

These commands remove any previous created links to your site.

After that, you can select the plus icon at the top left to create or link a new site.

Database

Herd detects Tinkerwell and TablePlus on your machine and the buttons automatically open these tools instead of Laravel Tinker on the command line or Adminer for databases.

SQLite databases have no credentials and the other databases use root as the username without a password. In most cases, you should be able to simply click the login button and work with the database.

Open in IDE

You can quickly open the site in your IDE by clicking the “Open” button or by running the herd edit command in your CLI. You can set your default IDE in the Herd Settings under the “General” tab. Currently, PhpStorm, VS Code, and Sublime Text are supported. Please note that site-wide opening is only available for PhpStorm and VS Code due to limitations with Sublime Text. However, you can still open individual files in Sublime Text, such as when clicking on a location in the Dumps window.

For PhpStorm, make sure to install the latest version of the PhpStorm protocol handler. For Sublime Text, the subl-protocol is required.

Application Information

The “Information” tab gives you a brief overview of the application. Laravel apps display the content of the php artisan about command, but you can customize the overview by using a custom driver for your site.

Integrations

Herd allows linking your local site with first-party Laravel cloud services and makes triggering common tasks like deployments super easy. At the moment, Herd supports connecting to sites on Laravel Forge with the Forge integration.