migration建立表

複製database/migrations文件夾下的有的數據遷移文件,改寫表結構php php artisan migrate 而後執行上面命令便可建立出posts表(laravel中表命名規則,主鍵:id,外鍵使用:如:user_id:模型名+id)html $table->timestamps();   自動建立出created_at和updated_at字段 laravel
相關文章
相關標籤/搜索