public function newPivot(Model $parent, array $attributes, $table, $exists)
{
return new YourCustomPivot($parent, $attributes, $table, $exists);
}
class Base extends Eloquent {
public function newPivot(Eloquent $parent, array $attributes, $table, $exists)
{
return new Membership($parent, $attributes, $table, $exists);
}
资料说这样玩,但是还是晕,各种报错
使用官方Model Context Protocol PHP SDK将PHP应用程序功能暴露为MCP工具、资源和提示,用于代理工作流。
回复内容:
public function newPivot(Model $parent, array $attributes, $table, $exists)
{
return new YourCustomPivot($parent, $attributes, $table, $exists);
}
class Base extends Eloquent {
public function newPivot(Eloquent $parent, array $attributes, $table, $exists)
{
return new Membership($parent, $attributes, $table, $exists);
}
资料说这样玩,但是还是晕,各种报错










