/** * @param null $http_method * * @return $this */ function put($http_method = null, $ext = null) { static::$icons[$this->getAs()] = $this->getIcon(); \Route::group(['middleware' => $this->getMiddleware(), 'domain' => $this->getDomain(), 'prefix' => $this->getPrefix()], function () use($http_method, $ext) { $method = self::normalizeMethod($http_method); /** @var $route \Illuminate\Routing\Route */ $route = \Route::$method($this->getUrl() . ($ext ? '.' . $ext : ''), ['as' => $this->getAs(), 'uses' => $this->getUses()]); if (count($this->getPatterns())) { $route->where($this->getPatterns()); } }); $this->action = null; $this->icon = null; return $this; }