Skip to content

Latest commit

 

History

History
52 lines (36 loc) · 1.36 KB

README.md

File metadata and controls

52 lines (36 loc) · 1.36 KB

slim-angular

Example application(CRUD of articles) using angulajs with a php restfull api(slim + doctrine2 + smarty)

cd /var/www/ or cd yourlocalhostfolder
$ git clone https://github.com/fmunoz92/slim-angular.git
$ cd slim-angular
$ curl -s https://getcomposer.org/installer | php

Configure db:

create an empty database: for example "angularphp"

set config in bootstrap.php

define("DBHOST", '127.0.0.1');
define("DBDRIVER", 'pdo_mysql');
define("DBNAME", 'angularphp');
define("DBUSER", 'root');
define("DBPASS", '1');
define("DEBUG", 1);

then run

$ php composer.phar install
$ php vendor/bin/doctrine orm:schema-tool:update --force

finally run your browser in http://localhost/slim-angular

Files

Server-side:

Slim Routes definition

Articles doctrine entity

Index view

Client-side

Articles Controller

Routes definition

Handlebarsjs views