我正在使用拉拉维尔。我需要知道如何在 php 8 中使用属性编写 phpdoc。
/**
* Transform the resource into an array.
*
* @param \Illuminate\Http\Request $request
* @return array
*/
public function toArray($request)
{
//Some code
return [];
}
Run Code Online (Sandbox Code Playgroud)
有人可以解释一下上面的代码如何用属性来编写吗?