• Call Us: +92-333-7276335
  • - Mail Us: info@shekztech.com

Plot 1177, Sector 31B - Crossing, Karachi, Sindh

Loading...
How to Install Laravel 12: A Complete Beginner’s Guide (2025)
  • Views: 15
  • Category: Laravel
  • Published at: 09 Mar, 2025
  • Updated at: 09 Mar, 2025

How to Install Laravel 12: A Complete Beginner’s Guide (2025)

If you are creating web applications or if you are going to create an Enterprise level application Laravel is the best option for you, I have created thousands of websites by using Codeigniter,  I started my career with Codeigniter the earliest version, and I've used the first time Laravel in 2016 or in 2017 at that time I feel that this is the best framework I have ever seen in PHP.

So, if you want to install the laravel, you have a lot of ways to install the laravel 12 First of all, you have to install laravel 12 with the composer. What is the composer? Composite is a dependency manager that downloads all the dependencies out of the box for you, let's suppose you are going to manage your dependency manually if you duty to download the dependency from that particular website and you have to paste or keep your files in your specific folders so this is a single one so let's suppose if you have a lot of dependencies or the packages you are using in your project so it's hard to memorize each and everything and it's hard to memorize where you can keep your folder because every package has its own nature. 

You can download the composer from the official website of the composer and you can install the composer by clicking next and next but make sure before ending you have to give the PHP where you have installed the PHP, since I'm using the Laragon I have the multiple versions of the PHP and I know very well about that path.

First of all, you have to go to laravelle.com which is the official website, you can go to the menu to find the developers and under the developers, you have the documentation just click on the documentation, once you click on the documentation you have the versions available in the dropdowns currently the version is 12.x and now in the search bar just type server requirement.

The server requirements of laravel 12 are PHP >=8.2 (greater version of 8.2) and you also have to enable some kind of extensions mentioned here like c-type PHP extension, cURL PHP extension, and others ones, Make sure if you are using the samp vamp or lamp or any kind of server you have to enable these kinds of extensions if you are not familiar with the extensions you have to create the index.php and also use a built-in 
functions 
if (extension_loaded('OpenSSL)) {
    echo "OpenSSL extension is loaded.";
} else {
    echo "OpenSSL extension is not loaded.";
}

if (function_exists('openssl_encrypt')) {
    echo "The OpenSSL extension is enabled.";
} else {
    echo "The OpenSSL extension is not enabled.";
}

print_r(get_loaded_extensions());

if (in_array('pdo_mysql', get_loaded_extensions())) {
    echo "PDO MySQL extension is available.";
} else {
    echo "PDO MySQL extension is not available.";
}

 To check if the extensions are enabled or not. If they are not enabled, you have to access them, or you have to use the PHPini file and make sure you remove the semicolon: ;extension=openssl; if you are using the laragon, these extensions are by default enabled.

If you are using the CPanel or the cyber panel or any kind of panel that gives the PHP functionality you have to enable these kinds of extensions because these kinds extensions by default not enabled, sometimes you have to download the extensions then you have to use/enable the extensions,  if you are using the Linux operating system then you have a terminal to download the extensions.

Okay now install the laravel 12 version by using the composer just type composer global require Laravel / installer once you install the installer then type Laravel new myapp, wait for a few seconds or a few minutes it takes time if you are installing laravel 12 for the first time once you have downloaded then now go to the folder which you have just downloaded type CD myapp NPM install && NPM run build composer run dev.
To execute the laravel just type php artisan server and it gives you the link click on the link. 

This is the first way to install laravel 12 by using the composer you have another way to install laravel 12 if you are using laragon, okay guys so now open the laragon right click on the laragon windows and select the quick app then select laravel from dropdown after that enter your project name whatever you are going to use so let's suppose e-commerce then hit the enter button and wait for few seconds or few minutes the system automatically install the laravel 12 out of the box for you Make sure go to the laragon where you have installed and find the www directory.
Repeat the same process to run the laravel 12 i.e. php artisan serve and click the link. 

Congratulations you have successfully downloaded and also installed Laravel 12 which is the latest version of the laravel family on your local machine.

Shehzad Ahmed

Shehzad Ahmed is a highly qualified expert with a Master of Philosophy in Computer Science and a decade of extensive industry experience. With his impressive track record in web development and computer science, he has not only left an indelible mark on the industry but also made substantial contributions to education. Since , he has created more than eighty exhaustive courses, paving the way for innumerable individuals interested in learning and development. His unparalleled knowledge and innate ability to elucidate complex ideas make him a highly sought-after educator and consultant. Choose Shehzad and take advantage of his exceptional balance of technical expertise and teaching prowess to propel your learning journey or project to new heights.

0 Comment(s)
Write your comment