
- 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
0 Comment(s)