Skip to content
Zend Framework Example with Add posts and comments
PHP
Find file
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
application
docs
public
tests
.zfproject.xml
README.markdown

README.markdown

  1. Create structure

    zf create project

  2. Enable layout

    zf enable layout

  3. Create Controllers (index, auth, post)

    zf create controller auth 1

    zf create action login auth 1

    zf create action logout auth 1

    zf create controller post 1

    zf create action add post 1

    zf create action edit post 1

    zf create action delete post 1

    zf create controller comment 1

    zf create action add comment 1

    zf create action reply comment 1

    zf create action edit comment 1

    zf create action delete comment 1

  4. SetUp Database connection (pgsql, mysql)

    run sql script docs/createTables.sql

    $ mysql -u root -p <createTables.sql

  5. Create Models (user, post, comment)

    zf create db-table.from-database

    add models methods

  6. Create Forms (login, post, comment)

    zf create form login

    zf create form post

    zf create form comment

  7. Auth (Zend_Auth_Adapter_DbTable)

    $adapter = new Zend_Auth_Adapter_DbTable( $db, 'users', 'email', 'password', 'SHA1(?)' );

  8. Log (Zend_Log, Firebug)

    resources.log.fb.writerName = "Firebug"

    resources.log.fb.writerParams.firebug

    Default user login: test@test.com and password test

Something went wrong with that request. Please try again.