020 8090 9664
Map
  • Support
    • Raise a ticket
    • Call support
    • Network status
    • Support Hub
  • Login
    • Platform
  • HOW TO RAISE A SUPPORT TICKET
  • 020 8090 9664
  • Raise a Ticket
    Call Support
    Network Status
    Knowledge Base

    Nimbus
    • Managed Hosting
      • Hosting for WordPress
      • Magento
      • PHP Applications
      • Laravel Hosting
      • Ecommerce
      • Reseller Hosting
    • Servers
      • Server Hosting
      • VPS Servers
    • Platform
      • Agency Hosting Platform
      • NimCache Ultra
      • NimShield
      • NimWatch
    • Pricing
    • Sectors
      • I'm an agency
      • I'm a developer
      • I'm a freelancer
    • Resources
      • Blog
      • E-books
      • Reports
      • Webinars
      • Case Studies
    • Contact
  • Managed Hosting
    • Hosting for WordPress
    • Magento
    • PHP Applications
    • Laravel Hosting
    • Ecommerce
    • Reseller Hosting
  • Servers
    • Server Hosting
    • VPS Servers
  • Platform
    • Agency Hosting Platform
    • NimCache Ultra
    • NimShield
    • NimWatch
  • Pricing
  • Sectors
    • I'm an agency
    • I'm a developer
    • I'm a freelancer
  • Resources
    • Blog
    • E-books
    • Reports
    • Webinars
    • Case Studies
  • Contact
  • Home Blog How To Check Laravel Version: A Quick Guide
    How To Check Laravel Version: A Quick Guide
    Share article on Twitter
    Share article on LinkedIn
    Share article on Facebook

    How To Check Laravel Version: A Quick Guide

    By Kez | 02 Sep 24

    1. How to Check The Laravel Framework Version
    2. Using the Artisan Command
    3. Checking the `composer.json` File
    4. Inspecting the `Framework` File
    5. Checking via the Web Browser
    6. Using PHP Code Snippets
    7. Key Takeaways
    • How to Check The Laravel Framework Version
    • Using the Artisan Command
    • Checking the `composer.json` File
    • Inspecting the `Framework` File
    • Checking via the Web Browser
    • Using PHP Code Snippets
    • Key Takeaways

    Laravel’s elegant simplicity and powerful features allow you to create beautiful, secure apps full of powerful functionality. If you’re maintaining an existing project or beginning to explore a new one, knowing the exact Laravel version it’s built on is crucial.

     

    Knowing which current Laravel version your apps are using ensures compatibility with any major releases every year and minor and patch releases that occur as often as every week. If your apps (or client’s apps) aren’t using the minimum version required, updating them can cause more bugs than bug fixes.

     

    Below, we’re going to explore a few methods of how to check the Laravel version on your apps using artisan commands and several other methods. Whether you are on the command line, deep inside the code, or exploring via the browser, we’ve got you covered!

    How to Check The Laravel Framework Version

    Using the Artisan Command

    The most straightforward way to check the Laravel version on your Laravel applications is through the Artisan CLI, Laravel’s powerful command line interface.

     

    Steps:

     

    1. Navigate to your Laravel project directory – Open your terminal and use `cd` to navigate to the root directory of your Laravel project.
    2. Run the version command:

     

    php artisan –version 

     

    This command will output the Laravel version installed in your project, for example:

     

    Laravel Framework 10.5.1

     

    Why This Method?

     

    PHP artisan version is quick and reliable. It provides an immediate answer without needing to dive deep into code files. Plus, it works even if your application isn’t fully configured (as long as Artisan is functional). So, for the quickest answer to your Laravel project’s version, use this artisan command.

    Checking the `composer.json` File

    Another method is to inspect the `composer.json` file. This file holds the metadata about your Laravel project, including the Laravel version.

     

    Steps:

     

    1. Locate the `composer.json` file: This file is typically found in the root directory of your Laravel project.
    2. Open the file: Use any text editor (e.g., VS Code, Sublime Text, or even `cat` in the terminal).
    3. Look for the Laravel version:

     

    “require”: {

     

    “laravel/framework”: “^10.0”,

     

    …

     

    }

     

    The version constraint (e.g., `^10.0`) indicates the Laravel version your project uses.

     

    Why This Method?

     

    It’s handy when you’re reviewing the project dependencies and want to see Laravel’s version alongside other packages. It’s especially helpful when you need to check compatibility with specific Laravel releases, security patches or to confirm if an app is using a specific version.

    Inspecting the `Framework` File

    All Laravel versions store version control information in a core file. So, you can check this file directly within the source code to confirm the current version of Laravel. Here’s how:

     

    Steps:

     

    1. Navigate to the version file:

     

    – The file is located at `vendor/laravel/framework/src/Illuminate/Foundation/Application.php`.

     

    1. Search for the version method:

     

    – Inside the `Application.php` file, find the `version` method, which typically looks like this:

     

    public function version()

     

    {

     

    return ‘10.5.1’;

     

    }

     

    This will display the exact version of Laravel being used.

     

    Why This Method?

     

    This boot method is ideal if you want to do an in-depth inspection or debugging session. It’s also helpful when you want to confirm the version without relying on the command line or if you are working within the codebase already.

    Checking via the Web Browser

    If you have access to the web interface of your Laravel application, you can quickly check the version using a custom route or by viewing the default error page.

     

    Creating a Custom Route:

     

    1. Add a route in your `routes/web.php`:

    Route::get(‘/version’, function() {

     

    return app()->version();

     

    });

     

    1. Visit the route: Open your browser and navigate to `http://your-laravel-app/version`.

     

    This will return the Laravel version directly in your browser.

     

    Viewing the Error Page:

     

    If you trigger a 500 error or visit a non-existent route in a default Laravel installation (with debug mode enabled), you might see the Laravel version in the bottom-right corner of the error page.

     

    Why These Methods?

     

    Checking via a custom route is great when you want to allow non-technical team members to check the version easily. Useful when working on a client’s work in a hosted environment where you might not have SSH access, for example.

    Using PHP Code Snippets

    If you’ve already got your sleeves rolled up and are deep in the code or you’re looking to automate version checks, you can easily print the Laravel version using the PHP echo app.

     

    Example:

     

    echo app()->version();

     

    This line of code can be added anywhere in your project (e.g. a controller, view, or console command) to output the Laravel version.

     

    Why This Method?

     

    It’s perfect for embedding within scripts or custom commands. Plus it’s really handy for automated logs or reporting systems.

    Key Takeaways

    Knowing the Laravel version of your application is essential for maintaining, upgrading, and extending your project. Whether you’re on the command line, inspecting files, or interacting with your application via a web browser, there’s a method for finding the Laravel version no matter where you are. Each method has its own use cases, so choose the one that best fits your current workflow.

     

    Are you looking for lightning-fast web hosting for your Laravel applications? Nimbus is the answer! Our VPS can provide secure, quick and reliable hosting for all of your apps. Whether you’re managing 10 or 1,000, we have a hosting solution for you! Get in touch and see why Nimbus is the trusted partner of digital agencies and developers across the UK.

    Kez author image

    POSTED BY Kez

    Hi, I’m Kez, and I work in the dev team here at Nimbus. When I’m not coding up new features, you’ll find me talking about cars, exploring the latest in tech, or working on my side projects.

    3 quick facts:
    I like cars 🚗 Chasing tech trends 💻 Tinkering with electronics 🔨 🔧

    Kez author image

    POSTED BY Kez

    Hi, I’m Kez, and I work in the dev team here at Nimbus. When I’m not coding up new features, you’ll find me talking about cars, exploring the latest in tech, or working on my side projects.

    3 quick facts:
    I like cars 🚗 Chasing tech trends 💻 Tinkering with electronics 🔨 🔧

    Nimbus

    The hosting platform for ambitious UK agencies and freelancers

    Facebook Instagram Twitter LinkedIn YouTube

    Products

    • Hosting
    • Platform
    • Dedicated Servers
    • Pricing

    Resources

    • Blog
    • Support Hub
    • Network Status
    • Raise a Ticket
    • Support

    Terms & Conditions

    • Cancellations & Downgrades
    • Complaints Advice
    • Cookie Policy
    • Customer Privacy Notice
    • Information Security Policy
    • Payment & Delivery Policy
    • Privacy Policy
    • Terms & Conditions

    Company

    • Team
    • Careers
    • Reviews
    • Contact
    • Ecommerce

    © 2025 Nimbus Hosting Ltd. All rights reserved. Registered in England, Company No. 07366355