$categories = Category::find(1); $array = $categories->contents->toArray(); echo "<pre>"; print_r($array); echo $array[0]['pivot']['category_id']; die; How to get contents from collections of $ categories without an array?
Category.php model
public function contents() { return $this->belongsToMany('App\Content'); }
contentsnow thecontentsand take an id there, since you wrote you can get access to "extra fields", for example if you had an active table in the table - Orange_shadow