2017 © Pedro Peláez
 

library blog

Aura blog example

image

aura/blog

Aura blog example

  • Tuesday, November 18, 2014
  • by harikt
  • Repository
  • 2 Watchers
  • 9 Stars
  • 56 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

Aura.Blog

Aura version 2 blog example using the Action Domain Responder., (*1)

Installation

composer create-project -s dev aura/web-project aurav2
cd aurav2
composer require "aura/blog:2.0.*@dev"

Create a database and run the code., (*2)

SET NAMES utf8;
SET time_zone = '+00:00';
SET foreign_key_checks = 0;
SET sql_mode = 'NO_AUTO_VALUE_ON_ZERO';

DROP TABLE IF EXISTS `blog`;
CREATE TABLE `blog` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `title` varchar(255) NOT NULL,
  `intro` tinytext NOT NULL,
  `body` text NOT NULL,
  `author` varchar(200) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

Edit config/Common.php and in define() method we need to define the database connection as below., (*3)

$di->params['Aura\Sql\ExtendedPdo'] = array(
    'dsn' => 'mysql:dbname=auraauth;host=127.0.0.1',
    'username' => 'root',
    'password' => 'mysqlroot'
);

Change the username and password according to yours., (*4)

Run your local php server, (*5)

php -S localhost:8000 web/index.php

And browse http://localhost:8000/blog, (*6)

The Versions