Php

How To install Laravel 9 Via Composer/Installer

The laravel 9 has been launched on January 2022. This quick tutorial help to install Laravel 9 into your system. It’s too easy and simple as like previous laravel 8 version.

Laravel 9 has many features that continue the improvements. There is a variety of other bug fixes and usability improvements.

There is a number of ways to install laravel 9 into your system, You can use Laravel-installer or composer to install laravel.

You can also use homestead version of laravel, it’s a virtual machine. You can use Homestead as your local Laravel development environment.

Please make sure your server meets the following requirements:

  • PHP >= 7.2.0
  • BCMath PHP Extension
  • Ctype PHP Extension
  • JSON PHP Extension
  • Mbstring PHP Extension
  • OpenSSL PHP Extension
  • PDO PHP Extension
  • Tokenizer PHP Extension
  • XML PHP Extension

By Laravel Installer

First, download the Laravel installer using Composer, The vendor bin directory path for windows is – %USERPROFILE%\AppData\Roaming\Composer\vendor\bin.

composer global require laravel/installer

Once, The installer has been successfully installed, Please use laravel new command, which will create a fresh Laravel installation in the directory you specify.
laravel new crud-example

The above command will create a directory named crud-example containing a fresh Laravel installation with all of Laravel’s dependencies.

Via Composer To Install Laravel 9

You can also use composer to install laravel 9. We will use composer create-project command in your terminal as like below –
composer create-project --prefer-dist laravel/laravel crud-example

Related Post

We can use php artisan command for PHP’s built-in development server to serve your application,

php artisan serve

The above command will start a development server at http://localhost:8000.

Create a Virtual Host in XAMPP

Let’s create a virtual host for this Laravel project, Open the Apache httpd-vhosts.conf file which is located in D:\xampp\apache\conf\extra\httpd-vhosts.conf, Added below lines of code at the end of the file.

    DocumentRoot "D:/xampp/htdocs/crud-example/public"
    ServerName laravel-blog.com

Now, Open the hosts file which is located at C:\Windows\System32\drivers\etc\hosts, added the below code into this file at the end.
127.0.0.1 laravel-blog.com

restart the xampp server.

Let’s open the browser and navigate http://laravel-blog.com, Hopefully, You will get a welcome page of laravel.

How To Check The Laravel Version?

There are two ways to check the version of your Laravel application with Laravel. The first simple method is running a command on the command line to check the Laravel version. The second method is to look in the files for the Laravel version.

Let’s open your terminal or CLI and go to your project root directory and run the command for the check the laravel.

Recent Posts

Configure and Retrieve S3 Information Using Laravel PHP-AWS-SDK

This tutorial helps integrate a PHP SDK with Laravel. We'll install aws-php-sdk into laravel application and access all aws services… Read More

3 months ago

What is the Purpose of php_eol in PHP?

in this quick PHP tutorial, We'll discuss php_eol with examples. PHP_EOL is a predefined constant in PHP and represents an… Read More

9 months ago

Laravel Table Relationship Methods With Example

This Laravel tutorial helps to understand table Relationships using Elequonte ORM. We'll explore laravel table Relationships usage and best practices… Read More

9 months ago

Exploring the Power of Laravel Eloquent Join?

We'll explore different join methods of Laravel eloquent with examples. The join helps to fetch the data from multiple database… Read More

9 months ago

Quick and Easy Installation of Laravel Valet

in this Laravel tutorial, We'll explore valet, which is a development environment for macOS minimalists. It's a lightweight Laravel development… Read More

10 months ago

What is Laravel Soft Delete and How Does it Work?

I'll go through how to use soft delete in Laravel 10 in this post. The soft deletes are a method… Read More

10 months ago

Categories