HeisenbergMVC is really a great app for begginners. Really easy to setup and get started. We use a MVC structure like other popular PHP Frameworks.
You get traditional Model, Controller and View relations with easy Database actions. More on below.
- Apache v2.0 or higher.
- MySQL
- PHP 7.4 or higher recommended
- Git v2.0 or higher.
Before installing HeisenbergMVC we need to create a Virtual Server to get our app running. When you are using a project for production, it is highly recommended to create a Virtual Server, that's why we are making it from the start.
Steps are below.
-
Go to your root Apache folder (For most Xampp users, it is in the
C:/xampp/apache). -
Edit
conf/httpd.confand uncomment these three lines.-
Set
#LoadModule rewrite_module modules/mod_rewrite.sotoLoadModule rewrite_module modules/mod_rewrite.so. -
Set
#LoadModule vhost_alias_module modules/mod_vhost_alias.sotoLoadModule vhost_alias_module modules/mod_vhost_alias.so. -
Set
#Include conf/extra/httpd-vhosts.conftoInclude conf/extra/httpd-vhosts.conf.
-
-
Go to
conf/extra/httpd-vhosts.conf.-
At the bottom of the document add the following lines.
<VirtualHost *:80> ServerAdmin webmaster@localhost ServerName heisenberg.local ServerAlias heisenberg.local DocumentRoot "[__PATH TO YOUR PROJECT FOLDER__]" <Directory "[__PATH TO YOUR PROJECT FOLDER__]"> Options Indexes FollowSymLinks AllowOverride All Require all granted </Directory> ErrorLog logs/heisenberg.error.log CustomLog logs/heisenberg.custom.log common </VirtualHost>
-
-
Change
ServerNameandServerAliasof your choosing, but add the.localin the last. -
ServerNamewill be used to access theURLROOTduring the installation, so have that in mind. -
NOTE: When you type the
ServerNamein your browser, addhttp://before it. -
Change the
__PATH TO YOUR FOLDER__to the actual path of your Project Folder. -
Edit
C:/Windows/System32/drivers/etc/hosts -
Type
127.0.0.1 heisenberg.local -
Restart Apache.
-
There you go, the Virtual Server is ready to start.
-
Go to your root Apache folder and open in Terminal (For Lamp Stack users, it is in the
/etc/apache2). -
We're going to create a new configuaration rather than adding it to the Host
conffile. -
$sudo nano sites-available/heisenberg.conf- Here we are naming the conf file
heisenberg.conf, you can name it whatever you want, but remember it for the setup purposes.
- Here we are naming the conf file
-
<VirtualHost *:80> ServerAdmin webmaster@localhost ServerName heisenberg.local ServerAlias heisenberg.local DocumentRoot "[__PATH TO YOUR PROJECT FOLDER__]" <Directory "[__PATH TO YOUR PROJECT FOLDER__]"> Options Indexes FollowSymLinks AllowOverride All Require all granted </Directory> ErrorLog ${APACHE_LOG_DIR}/error.log CustomLog ${APACHE_LOG_DIR}/access.log combined </VirtualHost> -
Change
ServerNameandServerAliasof your choosing, but add the.localin the last. -
ServerNamewill be used to access theURLROOTduring the installation, so have that in mind. -
NOTE: When you type the
ServerNamein your browser, addhttp://before it. -
Change the
__PATH TO YOUR FOLDER__to the actual path of your Project Folder. -
Save the file.
-
$sudo a2ensite heisenberg.conf -
$sudo a2dissite 000-default.conf- If you have any other default configuration already set up, then type that instead of
000-default.conf
- If you have any other default configuration already set up, then type that instead of
-
$sudo a2enmod rewrite -
$sudo nano /etc/hosts -
Type
127.0.0.1 heisenberg.local -
Save the file.
-
$sudo systemctl restart apache2ORsudo service apache2 reload
Installing HeisenbergMVC is easy. Here are the steps below on how to properly install HeisenbergMVC.
-
Open your Terminal or Command Prompt or Powershell
-
git clone https://github.com/ayaneshsarkar/heisenberg.git -
composer install -
Create an empty database
-
Copy
.env.sampleto.envand set up the Database Config. -
Open favourite browser and go to
http://__VIRTUALADDERESS__ -
And there you go, HeisenbergMVC is installed!