mirror of
https://github.com/prurigro/hypothetical.git
synced 2024-11-21 15:42:31 -05:00
Get blog tags working again
This commit is contained in:
parent
12a5e6b19b
commit
a063aaa1a1
1 changed files with 3 additions and 2 deletions
|
@ -4,6 +4,7 @@ namespace App\Models;
|
|||
|
||||
use Parsedown;
|
||||
use App\User;
|
||||
use App\Models\BlogTags;
|
||||
|
||||
class Blog extends DashboardModel
|
||||
{
|
||||
|
@ -41,8 +42,8 @@ class Blog extends DashboardModel
|
|||
// Replace the tags string with an array
|
||||
$tags = [];
|
||||
|
||||
foreach (explode(';', $blog_entry['tags']) as $tag) {
|
||||
array_push($tags, $tag);
|
||||
foreach (BlogTags::where('blog_id', $blog_entry->id)->orderBy('order')->get() as $tag) {
|
||||
array_push($tags, $tag['name']);
|
||||
}
|
||||
|
||||
$blog_entry['tags'] = $tags;
|
||||
|
|
Loading…
Reference in a new issue