How To

How to Install Laravel 10 using Composer

In this blog, we will learn about How to Install Laravel 10 using Composer.

Laravel is a web application framework with expressive, elegant syntax. Laravel is used for creating web-based applications following the model-view-controller (MVC) architectural pattern and is based on Symfony. Laravel provides a better development experience while providing dependency injection, database abstraction layer, queues and scheduled jobs, unit and integration testing, and more.

Let’s learn How to Install Laravel 10 using Composer

Steps to Install Laravel 10 using Composer:

Step 1: Prerequisites

  • Php version – 8
  • Composer version – 2

Composer to install all required libraries to run Laravel.

You can install Composer from the link given below

https://getcomposer.org/ 

After installation of the composer, run the below command on your terminal.

Composer

It gives output like this.

Step 2: After Successfully installing PHP and Composer, you need to create a new Laravel project via Composer. Run the below command.

composer create-project laravel/laravel blog-app

It gives output like this.

Step 3: After successfully creating the project, start Laravel’s local development server using Laravel’s Artisan CLI serve command

cd blog-app
php artisan serve

It gives output like this.

Now copy this link and paste it into your browser. It will look like this.

Conclusion:

Using the above steps, you can swimmingly install Laravel 10 using Composer. Alternatively, you can also install ReactJS using Laravel. If you cannot install Laravel 10, let me know through the comment box.

Moreover, share the tutorial with your Laravel friends and stay updated with us so that you do not miss out on important solutions.

Happy Coding!

Click to rate this post!
[Total: 16 Average: 4.1]
Bharat Desai

Bharat Desai is a Co-Founder at MageComp. He is an Adobe Magento Certified Frontend Developer 🏅 with having 8+ Years of experience and has developed 150+ Magento 2 Products with MageComp. He has an unquenchable thirst to learn new things. On off days you can find him playing the game of Chess ♟️ or Cricket 🏏.

View Comments

  • Got this error after
    php artisan serve

    PHP Warning: require(C:\xampp\htdocs\trav_lesson/vendor/autoload.php): Failed to open stream: No
    such file or directory in C:\xampp\htdocs\trav_lesson\artisan on line 18
    PHP Fatal error: Uncaught Error: Failed opening
    required 'C:\xampp\htdocs\trav_lesson/vendor/autoload.php' (include_path='.;C:\php\pear') in C:\xampp\htdocs\trav_lesson\artisan:18
    Stack trace:
    #0 {main}
    thrown in C:\xampp\htdocs\trav_lesson\artisan on line 18

    • Please run the below command to your project's root directory, I think you missed this step.

      $ composer install

  • It installs Laravel 9.0 and if I use composer create-project laravel/laravel:^10.0 example-app y return error " Could not find package laravel/laravel with version 10"

  • Note that php version at least 8.1 is required.
    I had php 8.0.13 in my path, and got laravel 9.
    Would be useful to know how to require laravel of exact version when creating project.

    • You may try with the below command to install a specific version of laravel.
      composer create-project laravel/laravel:^8.0 example-app

Recent Posts

What are Net Sales? How to Calculate Your Net Sales?

In the world of business, understanding financial metrics is crucial for making informed decisions and…

1 day ago

Magento 2 Extensions Digest April 2024 (New Release & Updates)

Welcome to the MageComp Monthly Digest, where we bring you the latest updates, releases, and…

1 day ago

The ABCs of Geofencing: Definition, Features and Uses

In this era, businesses are always on the lookout for ways to engage with their…

2 days ago

How to Delete Product Variant in a Shopify Remix App using GraphQL Mutations?

Managing a Shopify store efficiently involves keeping your product catalog organized. This includes removing outdated…

3 days ago

6 Innovative Tools Revolutionizing E-Commerce Operations

E-commerce has transformed the way consumers shop for products and services and interact with businesses.…

5 days ago

How Upcoming Cookie Changes Will Affect Your E-commerce Website?

The e-commerce world is constantly in flux. New tech and strategies emerge daily to help…

5 days ago