Setup Laravel 11.x project in Windows

Опубликовано: 02 Март 2026
на канале: Aurora Computer Studies
821
11

1. Download and configure PHP 8.3
2. Download and install MySQL or MariaDB (XAMP/WAMP).
3. Download and install VSC.
4. Download and install Composer.
5. Create a Laravel 11.x project using Composer.
6. Configure Laravel project.
7. Add simple Hello route, controller, page and test it.

1. Download, install & configure PHP
1.1. Add php folder to system PATH
check version
$ php --version

1.2. Rename php.ini-development to php.ini(PHP root folder)

1.3. Uncomment following in newly renamed php.ini
extension=curl
extension=fileinfo
extension=gd
extension=mbstring
extension=openssl
extension=pdo_mysql
extension=zip

1.4. Uncomment and edit extension dir to ext folder of your php installation folder.
; On windows:
extension_dir = "C:\php\ext"

Increase memory limit from 128M to 256M
memory_limit = 256M


1.5. Check if php is working by adding hello.php

Create a folder and add hello.php

'<'?php
echo 5 + 2;

Test in command line.
$ php hello.php

start PHP server
php -S localhost:8000

Check in the browser.
localhost:8000/test.php

2. Download & install MySQL/MariaDB (XAMP or WAMP)

3. DOWNLOAD, install & configure VSC
3.1 Drag and drop the project folder.

3.2 Check if PHP is accessible from VSC.
Ctrl + j to take a command terminal
$ php hello.php

start PHP server
php -S localhost:8000

localhost:8000/test.php

Delete the test.php file.

4. Install & configure Composer
https://getcomposer.org/download/

$ composer --version

5. Create a Laravel project
composer create-project laravel/laravel myapp

6. Configure the Laravel project.
Modify .env file in project root folder to configure the project to MySQL.

Create required database tables & migrate
$ php artisan migrate

Check if relevent tables are cretaed in MySQL. (You may use phpmyadmin if you use XAMP/WAMP) or connect to MySQL commandline console.

Start PHP development server
$ php artisan serve

http://localhost:8000/

7. Add the route, controller & view (blade) files.

7.1. Add a hello route to routes/web.php
Route::get('/hello', 'App\Http\Controllers\HelloController@index');


7.2. Create HelloController
$ php artisan make:controller HelloController

It create /app/http/controller/HelloController


Add following code inside the HelloController class
public function index()
{
$x = "Hello Beutiful World";
return view('hello', ['text' ='>' $x]);

}

7.3. Add blade file name hello.blade.php under resources/views

{{ $text }}

7.4. test the app in the browser

http://localhost:8000/hello











php artisan serve

php artisan migrate

php artisan migrate:fresh --force

php artisan make:migration create_quizzes_table

php artisan make:controller QuizController --resource

php artisan make:model Quiz