请问 Request 中 attributes 有什么用呢?
Request 中,我看都写了 attributes()
方法,但是这个方法有什么作用呢,没看到调用,而且laravel 5.5 Request
中也没有介绍到这个方法。
public function attributes()
{
return [
'title' => '标题',
'body' => '话题内容',
'category_id' => '分类',
];
}
推荐文章: