Laravel Valet

Valet is basically a Laravel development environment that is for Mac minimalists. There is no Vagrant, no /etc/hosts file. The programmer can even share their sites publicly just by using local tunnels. And with these features it has become the most likable software of all time. 

Laravel-valet
Laravel Valet
As a matter of the fact, Laravel also offers Homestead that is nothing but another local Laravel development environment. Homestead and Valet generally differs in regards to their intended audience and also their approach to the local development. 

Homestead is known to offer an entire Ubuntu virtual machine with an automated Nginx configuration. Homestead is basically a wonderful selection in case the programmer wants a fully virtualized Linux development environment or is on Windows / Linux.

Valet has a specialty that it only supports Mac and it is mandatory for the programmer to install PHP and a database server that too directly onto their local machine. 

This is an easy task and can be easily achieved just by using Homebrew with the commands such as brew install php and brew install mysql.

Laravel Valet is known to deliver an amazingly fast local development environment that too with minimal resource consumption, hence, that makes it great for the developers who only need PHP / MySQL instead of a fully virtualized development environment.

Please note that both Valet and Homestead are known to be the great choices for configuring the user’s Laravel development environment. The matter of choosing any one of them is solemnly yours and the participants of your team.

Installation

In order to install the Laravel Valet, macOS and Homebrew are generally required. Before the installation begins, the programmer must make sure that there are no other programs like Apache or Nginx are binding to their local machine's port 80. Here are the steps of the installations that are depicted below:
  • If the user has Homebrew then it is recommended to update it to the latest version using brew update or if the user do not have Homebrew the install it from the web.
  • Second step involves the installation of the PHP 7.3 by the help of the Homebrew via brew install php.
  • Install the Composer after you have installed the PHP 7.3.
  • After the last step the user has to install Laravel Valet with a Composer with the help of the composer global that require laravel/valet. Please make sure that the ~/.composer/vendor/bin directory is available in your system's "PATH".
  • After all these steps please run the valet install command. Doing this will configure and install Valet and DnsMasq, and also it will register Valet's daemon in order to launch when your system starts.

Once the Laravel Valet is installed in your system then try pinging any *.test domain on your terminal by the help of a command like ping foobar.test. In case, the valet is installed correctly then the user will see this domain responding on the 127.0.0.1. The valet will start automatically its daemon each time the machine of the user boots. Please note that there is no need to run the valet start or the valet install ever again once the initial Valet installation is complete, it is needed to be only once.

Read More.....






Comments

  1. This is a very informative post on Laravel Valet. I would love to read more.
    Laravel Web Development Services

    ReplyDelete

Post a Comment

Popular posts from this blog

Laravel Application Structure

PHP Projects Free Download With Source Code

Best PHP Coaching Center in Noida