问答 / 900 / 1 / 创建于 5年前
我直接使用->index()竟然不行,后面再change()也不行。有没有好的办法。
你要看timestamps方法的返回值是什么啊,压根就没返回东西,当然没法调用index等链式方法。 想要加索引也很简单,自己按照tiemstamps方法重写就行了,没必要非抓着timestamps不放
timestamps
index
tiemstamps
public function timestamps($precision = 0) { $this->timestamp('created_at', $precision)->nullable(); $this->timestamp('updated_at', $precision)->nullable(); }
我要举报该,理由是:
推荐文章: