Laravel: Eloquent How to get property of model if column name contains a dash?

后端 未结 0 509
闹比i
闹比i 2021-02-08 16:40

I have the following in my root route:

$user = User::all();
return $user->column-one;

Which returns the exception Use of undefin

相关标签:
回答
  • 消灭零回复
提交回复
热议问题