Browse Source

Sort project issue by update time

pull/37/head
Nafies Luthfi 7 years ago
parent
commit
2339a5f517
  1. 1
      app/Http/Controllers/Projects/IssueController.php
  2. 1
      resources/lang/de/app.php
  3. 1
      resources/lang/en/app.php
  4. 1
      resources/lang/id/app.php
  5. 2
      resources/views/projects/issues/index.blade.php

1
app/Http/Controllers/Projects/IssueController.php

@ -16,6 +16,7 @@ class IssueController extends Controller
public function index(Project $project)
{
$issues = $project->issues()
->orderBy('updated_at', 'desc')
->with(['pic', 'creator'])
->withCount(['comments'])
->get();

1
resources/lang/de/app.php

@ -17,6 +17,7 @@ return [
'total' => 'gesamt',
'count' => 'Summe',
'remark' => 'Remark',
'last_update' => 'Last Update',
// Action
'add' => 'Hinzufügen',

1
resources/lang/en/app.php

@ -17,6 +17,7 @@ return [
'total' => 'Total',
'count' => 'Count',
'remark' => 'Remark',
'last_update' => 'Last Update',
// Action
'add' => 'Add',

1
resources/lang/id/app.php

@ -17,6 +17,7 @@ return [
'total' => 'Total',
'count' => 'Jumlah',
'remark' => 'Keterangan',
'last_update' => 'Update',
// Action
'add' => 'Tambah',

2
resources/views/projects/issues/index.blade.php

@ -22,6 +22,7 @@
<th class="text-center">{{ __('comment.comment') }}</th>
<th>{{ __('issue.pic') }}</th>
<th>{{ __('issue.creator') }}</th>
<th>{{ __('app.last_update') }}</th>
<th class="text-center">{{ __('app.action') }}</th>
</thead>
<tbody>
@ -37,6 +38,7 @@
<td class="text-center">{{ $issue->comments_count }}</td>
<td>{{ $issue->pic->name }}</td>
<td>{{ $issue->creator->name }}</td>
<td>{{ $issue->updated_at->diffForHumans() }}</td>
<td class="text-center">
{{ link_to_route(
'projects.issues.show',

Loading…
Cancel
Save