@me108 You could clean it up a bit by doing this instead:
auth()->user()->posts->prepend(0, [
'id' => 0,
'user_id' => 0,
'title' => 'Default Post',
'content' => "I'm a fixed default post"
]); // optionally ->toArray(), if you want an array instead of a Collection
But I don't like the idea of passing ids and user_ids that don't exist. I don't know what you're doing with this data, but if you're passing it to the front end, you should probably just separate it into the array of data being passed. For example, if you're passing it to a view:
return view('my-view', [
'posts' => auth()->user()->posts,
'fixed_post' => [
'id' => 0,
'user_id' => 0,
'title' => 'Default Post',
'content' => "I'm a fixed default post"
],
]);