Check the Laravel version using the command line interface (CLI):
Open the terminal or command prompt on your computer.
Type the command "laravel -v" and press enter.
If Laravel is installed, the version number should be displayed.
Check the contents of the "composer.json" file:
Navigate to the root directory of your Laravel project.
Open the "composer.json" file in a text editor.
Check if "laravel/framework" is listed under the "require" section.
If it is listed, Laravel is installed.
Check the contents of the "vendor" directory:
Navigate to the root directory of your Laravel project.
Check if there is a "vendor" directory.
If there is a "vendor" directory, open it and check if "laravel" directory is present.
If "laravel" directory is present, Laravel is installed.
I assume that you have installed Laravel but are unsure whether you have done it correctly or not. No worries. Follow along to confirm your Laravel installation.
Go to the root folder of your project and run: -
php artisan serve
Then a link will be displayed. Click it. This will open your project in the browser confirming a successful installation.
Which Laravel version should you install?
The latest version of anything is usually the best. Thus, I recommend you to go with Laravel 9 which is its latest version which was launched on 8th February 2022. It was a major update of Laravel that came after a year and improved upon a lot from its previous version, Laravel 8.
Thus, Laravel 9 is the best option for Laravel currently, and look out for its upcoming updates to adapt it accordingly.