![](https://img-blog.csdnimg.cn/20201014180756918.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
laravue
文章平均质量分 88
yhlas
这个作者很懒,什么都没留下…
展开
-
laravel 数据库操作(表、字段)迁移表的字段写法
laravel 数据库操作(表、字段)迁移表的字段写法 1)创建表(make:migration create),例如创建 articles php artisan make:migration create_articles_table 运行命令后,会在 /database/migrations/ 生成对应的数据库迁移文件,通过修改文件里的 up 方法 和 down 文件,来创建数据表和删除数据表 public function up() { Schema::create('artic原创 2021-01-15 10:29:56 · 788 阅读 · 0 评论 -
laravel + mysql5.6 使用php artisan migrate 创建表报错的解决办法
laravel + mysql5.6 使用php artisan migrate 创建表报错的解决办法 1、修改config/database.php 修改成charset => 'utf8' collation =>'utf8_unicode_ci' 2、修改app/AppServiceProvider.php 在boot()下添加 Schema::defaultStringLength(191); ...原创 2020-11-10 16:01:20 · 209 阅读 · 0 评论