Add relationships
This commit is contained in:
parent
4ef8e9538b
commit
1d2e3b773d
|
|
@ -26,4 +26,13 @@ class Client extends Model
|
|||
*/
|
||||
protected $guarded = [ 'id' ];
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public function schedules()
|
||||
{
|
||||
return $this->hasMany(Schedule::class);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -13,4 +13,13 @@ class Schedule extends Model
|
|||
*/
|
||||
|
||||
protected $guarded = [ 'id' ];
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
*/
|
||||
public function client()
|
||||
{
|
||||
return $this->belongsTo(Client::class);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue