If you want to receive all Orders belonging to the current user, try using the following function.
public function index() { $orders = Auth::user()->with('Orders')->get()->toArray();
As pointed out by @Martin Heralecký, you also need to change hasOne() to belongsTo() in the Order Model. See Next (copied from @Martin Heralecký answer)
public function user(){ return $this->belongsTo("App\User");
Why applyTo ():
has_one and belongs_to are usually the same in the sense that they point to another related model. belongs_to make sure that this model has the value foreign_key. has_one ensures that another model has a file_key.
Your $orders array will look something like this:
User => [ id => 'user id', name => 'user name' orders => [ 0 => [
source share