filter = $filter; $this->key = $key; $this->label = $label ?: admin_trans_field($key); $this->queries = new Collection(); } /** * Get label. * * @return string */ public function getLabel() { return $this->label; } /** * Get model query conditions. * * @return array */ public function condition() { return $this->queries->map(function ($query) { return [$query['method'] => $query['arguments']]; })->toArray(); } /** * @return string */ public function render() { $url = request()->fullUrlWithQuery([ $this->filter->getScopeQueryName() => $this->key, $this->filter->grid()->model()->getPageName() => null, ]); return "