Files
pollux/app/PersonTarget.php
T
Lukas Halbritter 0608094039 Added views for indexing all people and showing a single one.
Added a method to get all (sub-)bookings associated with a person-target.
2018-09-09 10:01:37 +02:00

19 lines
331 B
PHP

<?php
namespace App;
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();
}
}