Skip to main content

Posts

How to install a specific version of Laravel

Sometimes, when starting a new Laravel project, you can't use the latest version. For example, what should you do when the PHP version on your server is lower than what Laravel requires? In such situations, you have several options: 1. Using Composer create-project (recommended): composer create-project laravel/laravel project-name "8.*" or you can change the order or add additional options composer create-project --prefer-dist laravel/laravel:^8.0 project-name It will install Laravel version 8.x into a project-name directory. If you want to install a specific minor version of Laravel 8, you can specify it more precisely. For example, to install version 8.0.1, you would use: composer create-project --prefer-dist laravel/laravel:^8.0.1 project-name 2. Using Laravel installer. If you already have PHP and Composer installed, you may install the Laravel installer via Composer. First, install the Laravel installer: composer global require laravel/installer Then create a new p...

How to Create a Laravel Project: A Beginner's Guide

Laravel is a popular open-source PHP framework for developing web applications. It is known for its elegant syntax, developer-friendly tools, and robust features. This guide is for newcomers to Laravel who want to learn how to create a Laravel project. Prerequisites Before you start creating a Laravel project, make sure you have the following software installed on your system: PHP: Laravel requires PHP 8.2 or higher. Composer: It is used to install Laravel and its dependencies. Node.js and NPM: Node.js and NPM (Node Package Manager). Database: MySQL, PostgreSQL, SQLite, or SQL Server. Installation There are several ways to create a new Laravel project. The recommended way is to use Composer: composer create-project --prefer-dist laravel/laravel project-name This command will create a new directory called project-name containing a fresh Laravel installation. Using the Laravel Installer Alternatively, you can use the Laravel Installer: laravel new project-name This command will also cre...