diff --git a/app/PersonTarget.php b/app/PersonTarget.php index a844fdf..aa47ae4 100644 --- a/app/PersonTarget.php +++ b/app/PersonTarget.php @@ -6,5 +6,13 @@ use Illuminate\Database\Eloquent\Model; class PersonTarget extends Model { - // + /* + * Get all bookings associated with a target. + * + * @return Illuminate\Database\Eloquent\Collection + */ + public function getBookings() + { + return $this->hasMany('\App\SubBooking')->get(); + } } diff --git a/resources/views/people/index.blade.php b/resources/views/people/index.blade.php index 7c8a364..cbf8071 100644 --- a/resources/views/people/index.blade.php +++ b/resources/views/people/index.blade.php @@ -24,7 +24,9 @@ {{ $person->email }} {{ $person->mobile }} {{ $person->phone }} - + + Anzeigen + @endforeach diff --git a/resources/views/people/show.blade.php b/resources/views/people/show.blade.php index e69de29..dbc65c2 100644 --- a/resources/views/people/show.blade.php +++ b/resources/views/people/show.blade.php @@ -0,0 +1,67 @@ +

Stammdaten

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ID{{ $person->id }}
Anrede{{ $person->title }}
Name / Firma{{ $person->name_or_company }}
Vorname{{ $person->surname }}
Straße{{ $person->street }}
Postleitzahl{{ $person->postal_code }}
Ort{{ $person->city }}
E-Mail{{ $person->email }}
Telefon{{ $person->phone }}
Mobil{{ $person->mobile }}
Geburtstage{{ $person->date_of_birth }}
+ + +

Konto

+ + + + + + + + + @foreach ($targets as $target) + + + + + + @endforeach +
 DatumZweckSollIst
> + {{ $target->date }}{{ $target->reference }}{{ $target->amount }}