AppDividend
Latest Code Tutorials

How To Upgrade Laravel Valet And Update To Laravel 6

0

In this tutorial, we will see How To Upgrade Laravel Valet And Update To Laravel 6. As a title suggests, we are using Laravel Valet to create a brand new Laravel project. But, when the latest version of Laravel arrives, we need first to upgrade the Laravel Valet then we can create a new version’s Laravel project otherwise it will create an old version’s Laravel project.

How To Upgrade Laravel Valet

Okay, so first, you had to have installed Laravel valet in your machine and now go to a terminal and type the following command.

composer global update

So, it will update the Laravel valet and related all the environmental dependency globally.

After upgrading, it is a better habit to run a valet install command so Valet can make the additional upgrades to your configuration files if necessary. See the below command.

valet install

After upgrading, it may be required to re-park or re-link your sites.

I have already sites folder. So, I will navigate to that folder and park my folder using the following command.

valet park

Create Laravel 6 Project

Next, create a new Laravel project in the sites directory by the following command.

laravel new laravel6

It will start crafting a new Laravel application.

 

How To Upgrade Laravel Valet

Now, go inside the folder and check the version of the new Laravel application by the following command.

➜  laravel6 php artisan --version
Laravel Framework 6.0.0
➜  laravel6

In the above output, we have got the Laravel 6, which is the current latest version.

Now, go to a browser and hit the following address to get the Laravel app’s default page.

http://laravel6.test/

Now, we can access the site in your browser at  http://laravel6.test.

The link Command

If we want to use the command, navigate to one of your projects, and run the valet link app-name in your command-line tool. Valet will create the symbolic link in ~/.config/valet/Sites, which points to your current working directory.

After running a link command, you can access your website in your browser at http://app-name.test.

In our case, it is http://laravel6.test/

Finally, How To Upgrade Laravel Valet And Update To Laravel 6 Tutorial is over.

Leave A Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.