Skip to content

Commit

Permalink
added author to models
Browse files Browse the repository at this point in the history
  • Loading branch information
A1Gard committed Feb 9, 2024
1 parent 6941dce commit 36cb6a8
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/Models/Category.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,4 +62,10 @@ public function getRouteKeyName()
{
return 'slug';
}

public function author()
{
return $this->belongsTo(\App\Models\User::class);
}

}
6 changes: 6 additions & 0 deletions src/Models/Clip.php
Original file line number Diff line number Diff line change
Expand Up @@ -76,4 +76,10 @@ public function fileUrl()

return \Storage::url('clips/' . $this->file);
}

public function author()
{
return $this->belongsTo(\App\Models\User::class);
}

}
6 changes: 6 additions & 0 deletions src/Models/Gallery.php
Original file line number Diff line number Diff line change
Expand Up @@ -81,5 +81,11 @@ public function imgurl()
}
}

public function author()
{
return $this->belongsTo(\App\Models\User::class);
}


//
}
6 changes: 6 additions & 0 deletions src/Models/Slider.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,10 @@ public function imgUrl()

return \Storage::url('sliders/' . $this->image);
}

public function author()
{
return $this->belongsTo(\App\Models\User::class);
}

}

0 comments on commit 36cb6a8

Please sign in to comment.