Der Laravel -Komplex hat eine von vielen Beziehung

Post a reply

Smilies
:) :( :oops: :chelo: :roll: :wink: :muza: :sorry: :angel: :read: *x) :clever:
View more smilies

BBCode is ON
[img] is ON
[flash] is OFF
[url] is ON
Smilies are ON

Topic review
   

Expand view Topic review: Der Laravel -Komplex hat eine von vielen Beziehung

by Anonymous » 04 Mar 2025, 08:16

Ich habe einen Mitarbeiter und ein Gehaltsmodell. < /p>
Ein Mitarbeiter hat viele Gehälter und ein Gehalt, das so definiert ist:

Code: Select all

    public function salary(): HasOne
{
return $this->hasOne(Salary::class)->ofMany([
'start_date' => 'max',
'id' => 'max',
], fn ($query) => $query->whereDate('start_date', '

Top