DEV Community

larawell-done
larawell-done

Posted on

8

Getting started with Laravel 10 - Installation

Laravel is a popular open-source PHP framework that is widely used for web development. It's known for its simplicity, flexibility, and powerful features that make it easier for developers to build robust and scalable applications. In this blog, we'll guide you through the process of installing Laravel 10 on any type of system, whether you're running Windows, macOS, or Linux.

Before installing Laravel 10, you need to ensure that your system meets the following requirements:

  • PHP 8.1
  • Composer
  • MySQL or any other database

Step 1: Install Composer

Composer is a dependency manager for PHP that helps you manage packages and libraries. Laravel uses Composer, so you'll need to install it on your system before you can proceed with the Laravel installation.

To install Composer, you can follow the steps below:

  1. Go to the official Composer website and download the installation package for your system.

  2. Run the installation package and follow the instructions to complete the installation.

  3. To verify that Composer is installed, open your terminal or command prompt and run the following command:

composer --version
Enter fullscreen mode Exit fullscreen mode

This should display the Composer version installed on your system.

Step 2: Install Laravel

With Composer installed, you can now proceed with installing Laravel by following these steps:

  1. Open your terminal or command prompt and navigate to the directory where you want to install Laravel.
  2. Run the following command to install Laravel:
composer create-project --prefer-dist laravel/laravel <project-name>
Enter fullscreen mode Exit fullscreen mode

Replace <project-name> with the name of your project.

  1. Composer will now download and install Laravel and its dependencies. This process may take some time depending on your internet speed and the complexity of your project.

  2. Once the installation is complete, you can verify that Laravel is installed by navigating to the project directory and running the following command:

php artisan --version
Enter fullscreen mode Exit fullscreen mode

This should display the version of Laravel installed on your system.

Congratulations, you've successfully installed Laravel 10 on your system.

Step 3: Configure the Database

Laravel uses a configuration file called .env to manage your application's environment variables. Open the .env file in your project directory and configure your database settings. You'll need to set the following variables:

DB_DATABASE=your_database_name
DB_USERNAME=your_database_username
DB_PASSWORD=your_database_password
Enter fullscreen mode Exit fullscreen mode

Replace your_database_name, your_database_username, and your_database_password with your own database credentials.

Step 4: Serve the Application

Finally, you can serve your application by running the following command in your terminal:

php artisan serve
Enter fullscreen mode Exit fullscreen mode

This will start a local development server that you can access by visiting http://localhost:8000 in your web browser.

http://localhost:8000

Conclusion

In this blog post, we've gone through the steps for installing Laravel 10 on your system. Now that you have Laravel installed, you can start building your web application with this powerful framework. Happy coding!

Image of AssemblyAI tool

Transforming Interviews into Publishable Stories with AssemblyAI

Insightview is a modern web application that streamlines the interview workflow for journalists. By leveraging AssemblyAI's LeMUR and Universal-2 technology, it transforms raw interview recordings into structured, actionable content, dramatically reducing the time from recording to publication.

Key Features:
πŸŽ₯ Audio/video file upload with real-time preview
πŸ—£οΈ Advanced transcription with speaker identification
⭐ Automatic highlight extraction of key moments
✍️ AI-powered article draft generation
πŸ“€ Export interview's subtitles in VTT format

Read full post

Top comments (0)

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs

πŸ‘‹ Kindness is contagious

Explore a sea of insights with this enlightening post, highly esteemed within the nurturing DEV Community. Coders of all stripes are invited to participate and contribute to our shared knowledge.

Expressing gratitude with a simple "thank you" can make a big impact. Leave your thanks in the comments!

On DEV, exchanging ideas smooths our way and strengthens our community bonds. Found this useful? A quick note of thanks to the author can mean a lot.

Okay