@@ -18,23 +18,23 @@ discard block |
||
18 | 18 | */ |
19 | 19 | public function index() |
20 | 20 | { |
21 | - return Admin::content(function (Content $content) { |
|
21 | + return Admin::content(function(Content $content) { |
|
22 | 22 | $content->header(trans('admin::lang.operation_log')); |
23 | 23 | $content->description(trans('admin::lang.list')); |
24 | 24 | |
25 | - $grid = Admin::grid(OperationLog::class, function (Grid $grid) { |
|
25 | + $grid = Admin::grid(OperationLog::class, function(Grid $grid) { |
|
26 | 26 | $grid->model()->orderBy('id', 'DESC'); |
27 | 27 | |
28 | 28 | $grid->id('ID')->sortable(); |
29 | 29 | $grid->user()->name(); |
30 | - $grid->method()->value(function ($method) { |
|
30 | + $grid->method()->value(function($method) { |
|
31 | 31 | $color = array_get(OperationLog::$methodColors, $method, 'grey'); |
32 | 32 | |
33 | 33 | return "<span class=\"badge bg-$color\">$method</span>"; |
34 | 34 | }); |
35 | 35 | $grid->path()->label('info'); |
36 | 36 | $grid->ip()->label('primary'); |
37 | - $grid->input()->value(function ($input) { |
|
37 | + $grid->input()->value(function($input) { |
|
38 | 38 | $input = json_decode($input, true); |
39 | 39 | $input = array_except($input, '_pjax'); |
40 | 40 | |
@@ -43,11 +43,11 @@ discard block |
||
43 | 43 | |
44 | 44 | $grid->created_at(trans('admin::lang.created_at')); |
45 | 45 | |
46 | - $grid->rows(function ($row) { |
|
46 | + $grid->rows(function($row) { |
|
47 | 47 | $row->actions('delete'); |
48 | 48 | }); |
49 | 49 | |
50 | - $grid->filter(function ($filter) { |
|
50 | + $grid->filter(function($filter) { |
|
51 | 51 | $filter->is('user_id', 'User')->select(Administrator::all()->pluck('name', 'id')); |
52 | 52 | $filter->is('method')->select(array_combine(OperationLog::$methods, OperationLog::$methods)); |
53 | 53 | $filter->like('path'); |