Skip to content

Propel-Slim-Twig PHP Application Stack. The most sophisticated application stack for starting any PHP application in a minute.

License

Notifications You must be signed in to change notification settings

koelle25/pst-stack

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PST-Stack

PST (Propel ORM - Slim Framework - Twig Template Engine) Stack in PHP is the most sophisticated stack to quickly build any kind of PHP application. This open source technology stack will let you create your application within a maximum of 120 seconds (2 minutes) without any hassle.

This stack was first created to quickly build any prototype or any quick but powerful web application within hours or a day and after that I made it open source to make your work more easy.

It includes user authentication/registration and some useful middleware (authenticated-/guest-only routes, CSRF, validation, saving old form input across requests).

Installation

Install Composer

If you haven't installed Composer yet, do that now.

Under *nix I prefer to install Composer globally in /usr/local/bin, but you may also install Composer locally in your current working directory.

Under Windows I prefer the Installer for global installation.

Composer Installation Guide

Install the Application

After you have installed Composer, run these commands from the directory in which you want to install your new Propel-Slim-Twig Application stack.

  1. Clone this repository (replace [your-app-name] with the desired directory name for your new application):

    $ git clone https://github.com/koelle25/pst-stack [your-app-name]
    $ cd [your-app-name]
    $ composer install
  2. Point your virtual host document root to your new application's public/ directory

  3. Create a database, e.g. by using phpMyAdmin or on the command line. When using mysql you can do (replace [your-database-name] with the desired database name for your new application):

    $ mysql -u root -p create [your-database-name]
  4. Configure Propel and generate it's ORM classes:

    • Copy/paste config/settings.sample => config/settings.php
    • Copy/paste propel/propel.sample => propel/propel.xml
    • Replace DatabaseUsername, DatabasePassword, DatabaseName in propel/propel.xml
    • Edit config/settings.php according to your needs
    • Edit propel/schema.xml according to your needs
  5. Now generate Propel ORM classed by issuing the following commands:

    • Go into the propel directory in your project root (e.g. /var/www/[your-app-name]):
      $ cd /var/www/[your-app-name]/propel
    • Build sql, model and config and insert the schema into your database:
      $ ../vendor/propel/propel/bin/propel sql:build
      $ ../vendor/propel/propel/bin/propel model:build
      $ ../vendor/propel/propel/bin/propel config:convert
      $ ../vendor/propel/propel/bin/propel sql:insert
  6. *nix only: Make tmp writable:

    $ cd /var/www/[your-app-name]
    $ chmod -R 777 tmp/

That's it! Now go build something cool. Go to your browser and type your application host (according to your virtual host). You can signup and login into the application by yourself.

Credits

This stack is built upon following resources:

About

Propel-Slim-Twig PHP Application Stack. The most sophisticated application stack for starting any PHP application in a minute.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • CSS 56.2%
  • HTML 29.1%
  • PHP 12.4%
  • JavaScript 2.3%