Added views for indexing all people and showing a single one.

Added a method to get all (sub-)bookings associated with a person-target.
This commit is contained in:
Lukas Halbritter
2018-09-09 10:01:37 +02:00
parent 50acdbd71e
commit 0608094039
3 changed files with 79 additions and 2 deletions
+9 -1
View File
@@ -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();
}
}