Skip to content

goncalogoncalves/esqueleto

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Esqueleto - PHP MVC skeleton

Esqueleto is a skeleton PHP MVC application.
It aims to be simple and fast with a good structure.
Ideal for rapid prototyping.

This is a work in progress

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development.

Prerequisities

Installing

Windows environment

Edit the file with admin priviledges C:\Windows\System32\drivers\etc\hosts
Add a new line with:

127.0.0.1  esqueleto.localhost

On apache server, uncomment the line from the file apache\apache2.4.18\conf\httpd.conf

Include conf/extra/httpd-vhosts.conf

On the httpd-vhosts file add

<VirtualHost *:80>
    ServerName esqueleto.localhost
    DocumentRoot C:/wamp64/www/esqueleto/public
    <Directory  "C:/wamp64/www/esqueleto/public/">
        Options Indexes FollowSymLinks MultiViews
        AllowOverride All
        Require local
    </Directory>
</VirtualHost>

Edit DocumentRoot and Directory accordingly (point to where you put the project inside the server)

This means that, everytime esqueleto.localhost is called in the browser, it will load the index file inside the DocumentRoot folder

From the command prompt, navigate to the root of the project and execute:

npm install
composer update
gulp

Import the db located at data/db_esqueleto.zip

Usage

  • Edit configs in app/config/app.php
  • Routes are defined in the db. You aldo need to update public/index.php
  • If you add a new controller, update the public/index.php

Deployment

In the config folder there are two files, one for development and other for production. In public/index.php change the mode you want

define('APP_MODE', 'development');

Built With

Contributing

  1. Fork it!
  2. Create your feature branch: git checkout -b my-new-feature
  3. Commit your changes: git commit -am 'Add some feature'
  4. Push to the branch: git push origin my-new-feature
  5. Submit a pull request :D

Authors

License

This project is licensed under the Apache License - see the LICENSE file for details

Acknowledgments

  • Thank you to all the people that was involved in one way or another
  • Inspiration from Slim framework and Mini
  • If you find any bugs, please report them.
  • Logo image taken from here