This forum has moved to a new location and is in read-only mode. Please visit talk.octobercms.com to access the new location.

ukebako8008
ukebako8008

Hi. Seems, there's a bug in docs at section http://octobercms.com/docs/database/model#relation-polymorph In example of morphing EventLog model, the key 'type' should be replaced to 'name', i.e:

public $morphMany = [
        'event_log' => ['Acme\Blog\Models\EventLog', 'type' => 'event_owner']
    ];

should be changed to

public $morphMany = [
        'event_log' => ['Acme\Blog\Models\EventLog', 'name' => 'event_owner']
    ];

Last updated

Scott
Scott

The docs are up on github, you can make the change and submit a pull request https://github.com/octobercms/docs/blob/master/database-model.md

1-2 of 2

You cannot edit posts or make replies: the forum has moved to talk.octobercms.com.