近期活动
dancheng99
dancheng99 评论 关联关系
3年前
dancheng99

dancheng99

来这里5年了

永久订阅用户  

在Eloquent 模型管理关联关系 比如1对1 1对多 return $this->hasOne('App\DbModel\Address','customer_id','user_id...

5年前 评论 laravel Eloquent ORM的复合主键问题

这资源类和下一篇的toArray(); toJson(); 我感觉没多大区别啊 他们有什么区别 好像除了能带点 模型里没有的数据 其他都一样

5年前 评论 API 资源类:架起模型与 JSON API 之间的桥梁

关联关系 如果你想要在响应中包含关联资源,可以将它们添加到 toArray 方法返回的数组。在本例中,我们使用 Post 资源类的 collection 方法添加用户博客文章到资源响应: /**...

5年前 评论 API 资源类:架起模型与 JSON API 之间的桥梁

Schema::create('iac_users', function (Blueprint $table) { $table->increments('user_id')->pr...

5年前 评论 数据库迁移:以版本控制的方式维护数据表

Notification::send($users, new InvoicePaid($invoice)) 这个是把消息发到每个users的email地址吗? $invoice是什么内容

5年前 评论 在 Laravel 中使用多种通道实现通知发送