點解唔用ISBN做ID?
woodlcw 發表於 2017-6-7 11:54 AM 
因為用ISBN 做ID的話… 就唔可以用到code generation
https://book.cakephp.org/3.0/en/bake/usage.html
係Cakephp…當我define左個table 叫 reviews
然後入面有user_id 同 book_id 兩個col的話
之后打個command bake 就會generate review modal, view (index, add, edit, admin)同埋個controller 出黎…而已因為naming convention 關係…佢知道埋review 同user 同book 既關係,個modal 都唔駛自己寫… |