我正在构建一个模型并使用chelout/laravel-relationship-events来捕获事件。我有一个模型,看起来像这样: class Taxonomyterm extends Model use HasMorphToManyEvents, HasMorphedByManyEventsrelation == 'items') {
dd('Attached Mo
在Laravel5.6中,Illuminate\Database\Eloquent\Relations\BelongsTo关系被赋予了支持默认模型的能力。这允许在关系为空时返回模型。关系使用的。下面是从特征调用getDefaultFor方法的关系中的一个方法的示例: * Get the results of the relationship.: