Add relationships

This commit is contained in:
Matthew Shillam 2018-10-23 19:05:10 +01:00
parent 4ef8e9538b
commit 1d2e3b773d
2 changed files with 18 additions and 0 deletions

View File

@ -26,4 +26,13 @@ class Client extends Model
*/
protected $guarded = [ 'id' ];
/**
*
*/
public function schedules()
{
return $this->hasMany(Schedule::class);
}
}

View File

@ -13,4 +13,13 @@ class Schedule extends Model
*/
protected $guarded = [ 'id' ];
/**
*
*
*/
public function client()
{
return $this->belongsTo(Client::class);
}
}