mirror of
https://github.com/BookStackApp/BookStack.git
synced 2025-07-28 17:02:04 +03:00
Added comment reply and delete confirmation.
Also fixed local_id bug Added component helpers Added global scroll & Highlight helpers
This commit is contained in:
@ -69,14 +69,15 @@ class Entity extends Ownable
|
||||
|
||||
/**
|
||||
* Get the comments for an entity
|
||||
* @return \Illuminate\Database\Eloquent\Relations\MorphMany
|
||||
* @param bool $orderByCreated
|
||||
* @return MorphMany
|
||||
*/
|
||||
public function comments()
|
||||
public function comments($orderByCreated = true)
|
||||
{
|
||||
return $this->morphMany(Comment::class, 'entity')->orderBy('created_at', 'asc');
|
||||
$query = $this->morphMany(Comment::class, 'entity');
|
||||
return $orderByCreated ? $query->orderBy('created_at', 'asc') : $query;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Get the related search terms.
|
||||
* @return \Illuminate\Database\Eloquent\Relations\MorphMany
|
||||
|
Reference in New Issue
Block a user