Skip to content

Commit

Permalink
Fix missing functions using Laravel helpers
Browse files Browse the repository at this point in the history
  • Loading branch information
jgrunder committed Aug 30, 2021
1 parent 2d2b39e commit 3f0accd
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions resources/views/_modules/news.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@
@if(isset($full))
{!! $article->text !!}
@else
{!! str_limit(strip_tags($article->text, '<p><br>'), $limit = 350, $end = '...') !!}
{!! Str::limit(strip_tags($article->text, '<p><br>'), 350) !!}
@endif
</p>
</div>
<div class="news_footer">
<p>{{Lang::get('all.news.by')}} {{($article->creator->pseudo !== '') ? $article->creator->pseudo : 'Admin'}} {{Carbon::parse($article->updated_at)->diffForHumans()}}</p>
<p>{{Lang::get('all.news.by')}} {{($article->creator->pseudo !== '') ? $article->creator->pseudo : 'Admin'}} {{\Carbon\Carbon::parse($article->updated_at)->diffForHumans()}}</p>
@if(!isset($full))
<a href="{{Route('news', ["slug" => $article->slug, "id" => $article->id])}}">{{Lang::get('all.news.next')}}</a>
@endif
Expand Down
2 changes: 1 addition & 1 deletion resources/views/admin/news/index.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<tr>
<th scope="row">{{$article->id}}</th>
<td>{{$article->title}}</td>
<td>{{str_limit($article->text, $limit = 50, $end = '...')}}</td>
<td>{{Str::limit($article->text, 50)}}</td>
<td>{{$article->creator->name}}</td>
<td>
<a class="btn btn-warning btn-xs" href="{{Route('admin.news.edit', $article->id)}}">
Expand Down

0 comments on commit 3f0accd

Please sign in to comment.