Commit f2dfcc964d4a1a7a4e486fb13c9a2c110fee8c3d

Authored by Alexey Boroda
1 parent 1ec8d36c

-Searching applied

Showing 2 changed files with 11 additions and 5 deletions   Show diff stats
backend/config/main.php
... ... @@ -17,6 +17,9 @@
17 17 'request' => [
18 18 'baseUrl' => '/rest',
19 19 'csrfParam' => '_csrf-backend',
  20 + 'parsers' => [
  21 + 'application/json' => 'yii\web\JsonParser',
  22 + ],
20 23 ],
21 24 'user' => [
22 25 'identityClass' => 'common\models\User',
... ... @@ -50,11 +53,12 @@
50 53 'enableStrictParsing' => true,
51 54 'showScriptName' => false,
52 55 'rules' => [
53   - [ 'class' => 'yii\rest\UrlRule',
54   - 'controller' => 'call',
55   - 'extraPatterns' => [
56   - 'GET search' => 'search',
57   - ]
  56 + [
  57 + 'class' => 'yii\rest\UrlRule',
  58 + 'controller' => 'call',
  59 + 'extraPatterns' => [
  60 + 'GET search' => 'search',
  61 + ],
58 62 ],
59 63 ],
60 64 ],
... ...
frontend/views/site/index.php
... ... @@ -22,6 +22,7 @@
22 22 <tr>
23 23 <th>ID</th>
24 24 <th>Company</th>
  25 + <th>Date</th>
25 26 <th>Status</th>
26 27 <th>Duration</th>
27 28 </tr>
... ... @@ -30,6 +31,7 @@
30 31 <tr v-if="" v-for="call in calls">
31 32 <td>{{call.id}}</td>
32 33 <td>{{call.company}}</td>
  34 + <td>{{call.calldate}}</td>
33 35 <td>{{call.status}}</td>
34 36 <td>{{call.duration}}</td>
35 37 </tr>
... ...