In this tutorial, we will show you how to install Laminas MVC skeleton application for your PHP development projects.
The following steps are for Windows OS only.
First, you must in XAMPP, please refer to another tutorial: Create local website on your PC.
Once XAMPP is installed, download and install Composer for Windows.
Composer should detect your PHP directory inside XAMPP during installation.
After installation, check that Composer is properly installed, by running the following command in Command Prompt.
Next, install Git for Windows.
Refer to our installation tutorial: Control your projects with Git.
Finally, you must open Command Prompt and execute the following command.
Note: Replace the directory below with your own!
composer create-project -s dev laminas/laminas-mvc-skeleton D:\xampp\htdocs\laminas-mvc
Composer will download and install all the Laminas MVS Skeleton files from GitHub into specified directory on your computer and launch the installation process.
You will be prompted to install
additional packages. You may accept all of them, by entering [Y].
Configure your URLs
Great, you have installed all needed components. Now it
is time to configure the access to your local Laminas website via browser.
1) Add the following lines to the
Note: Replace the file path with your own!
<VirtualHost *:80> DocumentRoot "D:/xampp/htdocs" ServerName localhost </VirtualHost> <VirtualHost *:80> ServerName localhost.laminas.com DocumentRoot D:\xampp\htdocs\laminas-mvc\public SetEnv APPLICATION_ENV "development" <Directory D:\xampp\htdocs\laminas-mvc\public> DirectoryIndex index.php AllowOverride All Require all granted </Directory> </VirtualHost>
Add the following line to the
Now restart you Apache server from XAMPP.
Navigate to your site in browser:
You must see the following page: