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:
@@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user