3C科技 娛樂遊戲 美食旅遊 時尚美妝 親子育兒 生活休閒 金融理財 健康運動 寰宇綜合

Zi 字媒體

2017-07-25T20:27:27+00:00
加入好友
此篇文章瀏覽量: 226 參考:Laravel-4-Generators // 建立tags資料表,欄位有name,型別用string代表VARCHAR $ php artisan generate:migration create_tags_table --fields="name:string" // 將資料表s_deposit更換成另一個名稱。使用php artisan migrate:make單純建立一個migrate檔 $ php artisan migrate:make rename_s_deposit_table // 建立lessons與tags的多對多的關聯資料表 $ php artisan generate:pivot lessons tags // 執行尚未執行的migrate檔 $ php artisan migrate // 替tags資料表建立seed檔:準備建立假資料 $ php artisan generate:seed tags // 重新執行所有的migrate檔及seed檔 $ php artisan migrate:refresh --seed // 建立產生資料表的migrate檔 $ php artisan generate:migration create_app_version_table // 建立controller檔 $ php artisan controller:make TagsController // 建立一個將deposit欄位新增至users資料表的migration檔 $ php artisan generate:migration add_deposit_to_users_table 若覺得文章有幫助,請多分享,讓其他同好也能吸收網站技能知識。 Facebook Twitter Google

本文由carlos-studiocom提供 原文連結

寫了 5860316篇文章,獲得 23313次喜歡
精彩推薦