Skip to content

Commit

Permalink
added date in companies page
Browse files Browse the repository at this point in the history
  • Loading branch information
denisdulici committed Sep 21, 2017
1 parent 4956f47 commit 8a49a58
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/Models/Company/Company.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class Company extends Eloquent
*
* @var array
*/
public $sortable = ['name', 'domain', 'email'];
public $sortable = ['name', 'domain', 'email', 'created_at'];

public function accounts()
{
Expand Down
4 changes: 3 additions & 1 deletion resources/views/companies/companies/index.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,10 @@
<table class="table table-bordered table-striped table-hover" id="tbl-companies">
<thead>
<tr>
<th class="col-md-5">@sortablelink('name', trans('general.name'))</th>
<th class="col-md-4">@sortablelink('name', trans('general.name'))</th>
<th class="col-md-2">@sortablelink('domain', trans('companies.domain'))</th>
<th class="col-md-2">@sortablelink('email', trans('general.email'))</th>
<th class="col-md-1">@sortablelink('created_at', trans('general.date'))</th>
<th class="col-md-3">{{ trans('general.actions') }}</th>
</tr>
</thead>
Expand All @@ -44,6 +45,7 @@
<td><a href="{{ url('companies/companies/' . $item->id . '/edit') }}">{{ $item->company_name }}</a></td>
<td>{{ $item->domain }}</td>
<td>{{ $item->company_email }}</td>
<td>{{ Date::parse($item->created_at)->format($date_format) }}</td>
<td>
<a href="{{ url('companies/companies/' . $item->id . '/set') }}" class="btn btn-info btn-xs"><i class="fa fa-arrow-right" aria-hidden="true"></i> {{ trans('general.change') }}</a>
<a href="{{ url('companies/companies/' . $item->id . '/edit') }}" class="btn btn-primary btn-xs"><i class="fa fa-pencil-square-o" aria-hidden="true"></i> {{ trans('general.edit') }}</a>
Expand Down

0 comments on commit 8a49a58

Please sign in to comment.