Skip to content
This repository was archived by the owner on Jan 5, 2019. It is now read-only.

Commit 3d23121

Browse files
author
Mario Basic
committed
Small visual update for services index.
1 parent 5cf2747 commit 3d23121

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

app/Http/Controllers/ServiceController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ class ServiceController extends Controller
1818
*/
1919
public function index()
2020
{
21-
$services = Service::orderBy('title')->with(['client'])->get();
21+
$services = Service::orderBy('month')->orderBy('day')->with(['client'])->get();
2222

2323
return view('services.index')->with(compact('services'));
2424
}

resources/views/services/index.blade.php

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,21 +19,23 @@
1919
<div class="table-responsive">
2020
<table class="table">
2121
<tr>
22+
<th>Repeats on</th>
2223
<th>Title</th>
24+
<th>Client</th>
25+
<th>Active</th>
2326
<th>Note</th>
24-
<th>Repeats on</th>
2527
<th>Cost</th>
26-
<th>Client</th>
2728
<th></th>
2829
</tr>
2930

3031
@foreach($services as $service)
31-
<tr class="@if($service->active) success @endif">
32+
<tr>
33+
<td>{{ $service->day }}.{{ $service->month }}</td>
3234
<td>{{ $service->title }}</td>
35+
<td>{{ $service->client->name }}</td>
36+
<td>{{ $service->active }}</td>
3337
<td>{{ $service->note }}</td>
34-
<td>{{ $service->day }}.{{ $service->month }}</td>
3538
<td>{{ $service->cost }} {{ $service->currency }}</td>
36-
<td>{{ $service->client->name }}</td>
3739
<td>
3840
{{ Form::open(['route' => ['services.destroy', $service->id], 'method' => 'DELETE', 'class' => 'confirm']) }}
3941
<a href="{{ route('services.edit', $service->id) }}" class="btn btn-xs btn-default">

0 commit comments

Comments
 (0)