Msieprawski\ResourceTable\ResourceTable::getSearchValue PHP Метод

getSearchValue() публичный статический Метод

Returns search form default value
public static getSearchValue ( string $name ) : mixed
$name string
Результат mixed
    public static function getSearchValue($name)
    {
        $getName = 'resource_table_' . $name;
        return Input::get($getName);
    }

Usage Example

Пример #1
0
 /**
  * Returns HTML with select options for searchable column
  *
  * @return string
  */
 private function _optionsHTML()
 {
     $result = '';
     foreach ($this->options() as $key => $label) {
         $selected = ResourceTable::getSearchValue($this->index()) == $key ? ' selected="selected"' : '';
         $result .= '<option value="' . $key . '"' . $selected . '>' . $label . '</option>';
     }
     return $result;
 }