Encore\Admin\Grid\Row::setPath PHP Method

setPath() public method

Set action path.
public setPath ( $path )
$path
    public function setPath($path)
    {
        $this->path = $path;
    }

Usage Example

Example #1
0
 /**
  * Build the grid rows.
  *
  * @param array $data
  *
  * @return void
  */
 protected function buildRows(array $data)
 {
     $this->rows = collect($data)->map(function ($val, $key) {
         $row = new Row($key, $val);
         $row->setKeyName($this->keyName);
         $row->setPath($this->resource());
         return $row;
     });
     if ($this->rowsCallback) {
         $this->rows->map($this->rowsCallback);
     }
 }