Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- public function project()
- {
- return $this->belongsTo(Project::class, 'commentable_id', 'id');
- }
- public function task()
- {
- return $this->belongsTo(Task::class, 'commentable_id', 'id');
- }
- public function commentable()
- {
- return $this->morphTo();
- }
Add Comment
Please, Sign In to add comment