Showing posts with label Install Laravel. Show all posts
Showing posts with label Install Laravel. Show all posts

Saturday, January 7, 2023

Laravel - Create new Project from Specific Version - Create Laravel Project for Version 6.X

It's very simple to install specific version if Laravel - for my case it's 6.
I usually use Git Bash to install Laravel. First open Git Bash and navigate to your directory where you want to install Laravel. Then Run below command to check PHP version first, you can check which PHP version is suitable for Laravel 6.X.

Then run command composer create-project --prefer-dist laravel/laravel app2 "6.20.*" will create a project for Laravel version 6.X.
Screenshot available:

Thursday, November 3, 2016

How to install Laravel 5 with Xampp (Windows)

Requirements:
1. PHP 5.5.9 or above
2. OpenSSL PHP Extension
3. PDO PHP Extension
4. Mbstring PHP Extension
5. Tokenizer PHP Extension

First of all, we need Xampp, so we can download it from the official page

After you've downloaded and installed Xampp, we need to install Composer from official page

After install it, we can open a Windows terminal and write composer for execute the command:




We will configure a Virtual Host in Xampp for a Laravel project, and in this example, we want to configure the domain laravel.local for our project.
We need to edit httpd-vhosts.conf that is located in C:\xampp\apache\conf\extra\httpd-vhosts.conf and add following lines at the end of the file:


<VirtualHost laravel.local:80>
    DocumentRoot "C:\xampp\htdocs\laravel\public"
    ServerAdmin laravel.local
    <Directory "C:\xampp\htdocs\laravel">
        Options Indexes FollowSymLinks
        AllowOverride All
        Require all granted
    </Directory>
</VirtualHost>

Now we have to configure our hosts file that allows to redirect laravel.local to the localhost that is located in C:\Windows\System32\drivers\etc, add "127.0.0.1 laravel.local" to the  end of the file named "hosts".

We are prepared to install and configure a Laravel Framework. First of all, we have to navigate to "C:\xampp\htdocs" folder to install it and run this following command:


composer create-project laravel/laravel your_folder







Finally, have to start our Apache and MySql from Xampp control panel



And need to start laravel as server using following command:

php artisan serve --port=45

and navigate to http://localhost:45 from browser: