'datetime', 'amount' => 'decimal:2', ]; // route key public function getRouteKeyName(): string { return 'order_id'; } public function user(): BelongsToAlias { return $this->belongsTo(User::class); } public function scopeThisUser($query) { return $query->where('user_id', auth()->id()); } }