I'm working on a site that has extended Models, eg.
class Asset extends Model {
public function project() {
return $this->belongsTo(Project::class);
}
}
class Video extends Asset {
}
Do I need to establish the same belongsTo
Eloquent relationship with the extended class, or by virtue of the parent class having it, will Laravel do the rest?
Additionally, is there any documentation anywhere that goes into detail about how to structure such relationships (ie. in terms of Controllers)? I can't find anything on the (usually excellent) Laracasts website.