Skip to content

Commit

Permalink
Better feeds, hotfix
Browse files Browse the repository at this point in the history
  • Loading branch information
stanislawfortonski committed Jan 29, 2021
1 parent d0eeaec commit ca35e67
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
4 changes: 1 addition & 3 deletions app/Models/Post.php
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,6 @@ public function scopeSearch($query, $searchData)
public function toFeedItem()
{
$content = $this->content->first();
if (empty($content))
return null;
return FeedItem::create()
->id($this->id)
->title($content->title)
Expand All @@ -101,7 +99,7 @@ public function toFeedItem()

public static function getFeedItems()
{
return static::all();
return static::with(['author', 'content'])->has('content')->visible()->orderBy('id', 'desc')->get();
}

static public function findOrFailByUrl($url)
Expand Down
2 changes: 1 addition & 1 deletion resources/views/layouts/app.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
{{ __('Categories') }}
</a>

<div class="dropdown-menu dropdown-menu-right" aria-labelledby="categoriesDropdown">
<div class="dropdown-menu" aria-labelledby="categoriesDropdown">
<a itemprop="url" class="dropdown-item" href="{{ route('categories.index', app()->getLocale()) }}">
{{ __('All') }}
</a>
Expand Down

0 comments on commit ca35e67

Please sign in to comment.