Find out your current Laravel version

Find out your current Laravel version

Published on 15.03.2024

When you’re working with Laravel, it’s sometimes necessary to know exactly which version of the framework you’re using. Whether you’re troubleshooting, updating, or just keeping track of your environment, being able to quickly determine your Laravel version is a handy skill. Here’s how to do it with ease.

Checking Without a Running Server

Imagine you’re in a situation where you don’t have access to a running server or the PHP command line. No problem! You can still figure out your Laravel version. Here’s how:

  • Dive into your project’s files until you find a file named composer.lock.
  • Open this file using any text editor you have handy.
  • Now, you’ll play a bit of a detective role. Look for a section that mentions "laravel/framework".
  • Under this section, you’ll see a line that reads "version": "some_number". This number is the version of Laravel your project is using.

Here’s an example of what you might see:

{
  "name": "laravel/framework",
  "version": "v8.40.0"
}

Using PHP Command Line

For those who have PHP installed and ready to go on your machine or server, there’s an even quicker way to check your Laravel version:

  • Open your command line tool.
  • Navigate to your Laravel project’s root directory.
  • Type this simple command and hit enter:
php artisan --version

Voilà! The terminal will then proudly present the version of Laravel you’re running.

And there you have it, folks – two straightforward methods to identify your Laravel version, ensuring you’re always informed and in control of your development environment. Happy coding!

Tags:
Laravel