Skip to content

Commit

Permalink
[refactor]Modify method name
Browse files Browse the repository at this point in the history
  • Loading branch information
z-song committed Aug 2, 2018
1 parent 68b94ff commit 3dffbef
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/Grid/Column.php
Original file line number Diff line number Diff line change
Expand Up @@ -303,14 +303,14 @@ public function display(Closure $callback)
}

/**
* Set value mapping.
* Display column using array value map.
*
* @param array $values
* @param null $default
*
* @return $this
*/
public function values(array $values, $default = null)
public function using(array $values, $default = null)
{
return $this->display(function ($value) use ($values, $default) {
return array_get($values, $value, $default);
Expand Down
4 changes: 2 additions & 2 deletions src/Show/Field.php
Original file line number Diff line number Diff line change
Expand Up @@ -134,14 +134,14 @@ public function as(callable $callable)
}

/**
* Set value mapping.
* Display field using array value map.
*
* @param array $values
* @param null $default
*
* @return $this
*/
public function values(array $values, $default = null)
public function using(array $values, $default = null)
{
return $this->as(function ($value) use ($values, $default) {
return array_get($values, $value, $default);
Expand Down

0 comments on commit 3dffbef

Please sign in to comment.