The Laravel framework has a few system requirements. If you are installing laravel 7. If you are trying to install Laravel by composer then it will automatically pick the laravel version according to your PHP version. But you can specify the version while installing it using composer.
- PHP >= 7.2.5
- BCMath PHP Extension
- Ctype PHP Extension
- Fileinfo PHP extension
- JSON PHP Extension
- Mbstring PHP Extension
- OpenSSL PHP Extension
- PDO PHP Extension
- Tokenizer PHP Extension
- XML PHP Extension
Visit the following URL and download composer to install it on your system.
Note: In case, the composer already installed your system then you don’t need to run the first step.
To verify composer is installed or not, by running
composer the command in terminal/cmd
You can install a specific version using the following command. Just need to change the version in place of 7.0
composer create-project --prefer-dist laravel/laravel:^7.0 blog
Install laravel according to the installed PHP version in your system by the following command.
composer create-project --prefer-dist laravel/laravel blog
It will take few minutes according to your internet speed.
Note: the blog is your folder/directory name, So you can change it as per your choice.
First, you need to go blog directory by the following command.
Start the Laravel service by executing the following command. This command will start a development server at
php artisan serve
Copy the URL from the terminal
http://127.0.0.1:8000 in the above screenshot and open that URL in the browser. If you see the following screen, it implies Laravel has been installed successfully.
Note: The above screenshot URL might be different in your case so use them. Also, the Web screen may be different for you due to the different versions of Laravel.