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

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

Loading...
Downloading and installing the Laravel via composer in windows
  • Views: 4.4K
  • Category: Laravel
  • Published at: 30 May, 2018
  • Updated at: 04 Sep, 2023

Downloading and installing the Laravel via composer in windows

Downloading and installing Laravel via Composer in Windows

Many people are confused about downloading and installing the Laravel framework on their machines because they download the option/button not available on the official website.

So it's harrowing to download the Laravel (if you are new) but believe me, it's straightforward to download and configure Laravel; before downloading, let's look at larval.

Laravel is a PHP framework, and in my opinion, it's the king in the PHP world, It has many excellent features to save you time like Eloquent ORM, Routing, and Middlewares, and its templating engine. But before downloading, you must have the following requirements.

  • Composer
  • PHP >= 7.1.3
  • OpenSSL PHP Extension
  • PDO PHP Extension
  • Mbstring PHP Extension
  • Tokenizer PHP Extension
  • XML PHP Extension
  • Ctype PHP Extension
  • JSON PHP Extension

Download the composer and install it in your local environment; now, open your command prompt and type the code listed below.

composer create-project --prefer-dist laravel/laravel blog

Please wait for a few minutes because it takes 4 to 7 minutes it depending on your internet and PC speed.

 

 

Once the downloading is completed, go to your project folder, which we have defined above blog, and type PHP artisan server.

 

 

Go to your browser and type this code http://127.0.0.1:8000/ 

You can download Laravel and install it on your local machine, but wait, if you want to execute the laravel setup in your server XAMPP or WAMP, follow the below instruction.

So we have installed the Laravel framework inside our c:/ folder. Just copy the folder and paste it inside your xampp/htdocs folder.

Now go to your xampp/apache/conf/extra/httpd-vhosts.conf and open the file httpd-vhosts.conf and paste this code in the last, make sure I have installed my xampp inside my c drive.

<VirtualHost *:80>
DocumentRoot "c:/xampp/htdocs"
ServerName localhost
</VirtualHost>

<VirtualHost *:80>
DocumentRoot "c:/xampp/htdocs/blog/public"
ServerName laravel.test
</VirtualHost>

Now go to your search console, type Notepad, right-click on the Notepad icon, and choose Run as administrator.

Once you open the notepad as administrator, type ctrl+o OR you can go to file and select open, go to your c:/Windows/System32/drivers/etc. and open the, etc. file; make sure it will not show you anything; choose All Files.

 

Now past this code in the last line.

127.0.0.1 localhost
::1 localhost
127.0.0.1 laravel.test

 

Save the file, restart your server (xampp), go to your browser, and type laravel.test

 

 

Conclusion

Installing Laravel is a complicated process if you are not familiar with Laravel or are new. If you want to run Laravel inside your server environment, i.e., XAMPP or WAMP, you have to make other changes in server files and Windows files. We can execute our Laravel projects inside our server by changing the files.

 

https://www.youtube.com/watch?v=RzZjf9U_SXc

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