Skip to content

Instantly share code, notes, and snippets.

@blieb
Created June 13, 2018 12:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save blieb/1d6190d8150e9b02dc13a39fd307dc5c to your computer and use it in GitHub Desktop.
Save blieb/1d6190d8150e9b02dc13a39fd307dc5c to your computer and use it in GitHub Desktop.
$this->belongsToMany('Contacts', [
'className' => 'Users',
'foreignKey' => 'message_id',
'targetForeignKey' => 'user_id',
'through' => 'MessageContacts'
]);
@blieb
Copy link
Author

blieb commented Jun 13, 2018

Array
(
[title] => Eekhoorn
[type] => 1
[user_id] =>
[contacts] => Array
(
[_ids] => Array
(
[0] => 1
)

    )

[message] => Dit is een speciaal bericht zonder datum
[start_date] => 13-06-2018 02:01
[end_date] => 13-06-2018 02:01

)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment