Created
December 29, 2017 14:57
-
-
Save VaguelyOnline/75d42429d21998540a7a670fd43a29e7 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // NB - Activity is a subclass of an Eloquent Model | |
| class Exercise extends Activity | |
| { | |
| public function details() | |
| { | |
| return $this->morphTo('details', 'details_type', 'id'); | |
| } | |
| } | |
| // ... as doe the parent class here... | |
| class HotspotExerciseDetails extends ExerciseDetails | |
| { | |
| public function images() | |
| { | |
| return $this->hasMany('HotspotImage', 'hotspot_exercise_detail_id'); | |
| } | |
| } | |
| class HotspotImage extends Eloquent | |
| { | |
| } | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment