Filed under: Symfony | Tags: crud in symfony, project in symfony, small project in symfony, symfony project
well here we are for build second symfony project. previously we have seen, how difficult first project was without a single line of php code. here is the second one similar to first project. but this time not only signp form. instead we implement a small project. lets start
propel:
article:
id: ~
title: { type: varchar(255), required: true }
slug: { type: varchar(255), required: true }
content: longvarchar
status: varchar(255)
author_id: { type: integer, required: true, foreignTable: author, foreignReference: id, OnDelete: cascade }
category_id: { type: integer, required: false, foreignTable: category, foreignReference: id, onDelete: setnull }
published_at: timestamp
created_at: ~
updated_at: ~
_uniques:
unique_slug: [slug]
author:
id: ~
first_name: varchar(20)
last_name: varchar(20)
email: { type: varchar(255), required: true }
active: boolean
category:
id: ~
name: { type: varchar(255), required: true }
tag:
id: ~
name: { type: varchar(255), required: true }
article_tag:
article_id: { type: integer, foreignTable: article, foreignReference: id, primaryKey: true, onDelete: cascade }
tag_id: { type: integer, foreignTable: tag, foreignReference: id, primaryKey: true, onDelete: cascade }
now goto command prompt and run few commands we already practice yesterday:
- from DOS prompt d:\dev\small_project> php symfony propel:build-all
- from DOS prompt d:\dev\small_project> php symfony propel:generate-crud frontend article Article
- from DOS prompt d:\dev\small_project> php symfony propel:generate-crud frontend author Author
- from DOS prompt d:\dev\small_project> php symfony propel:generate-crud frontend category Category
that’s it. readymade module for you. browse your project using:
http://loclhost:420/author
Hey!! i have no idea which client like this project
but yes developer might like it for customization and build a genuine one
No Comments Yet so far
Leave a comment
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <pre> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>