代码错误修复

This commit is contained in:
nilsir 2023-02-16 14:17:17 +08:00
parent 6803b0e05d
commit 80c6135711
3 changed files with 9 additions and 1 deletions

View File

@ -96,7 +96,7 @@ class AttributeRepo
return $attributeValue;
}
public function deleteValue($id)
public static function deleteValue($id)
{
AttributeValue::query()->findOrFail($id)->delete();
}

View File

@ -1,5 +1,8 @@
<?php
use Illuminate\Support\Facades\Route;
use Illuminate\Support\Facades\URL;
if (! function_exists('isActive')) {
/**
* Set the active class to the current opened menu.
@ -19,5 +22,7 @@ if (! function_exists('isActive')) {
if (strpos(URL::current(), $route)) {
return $className;
}
return '';
}
}

View File

@ -302,16 +302,19 @@ class Plugin implements Arrayable, \ArrayAccess
return Arr::has($this->packageInfo, $key);
}
#[\ReturnTypeWillChange]
public function offsetGet($key)
{
return $this->packageInfoAttribute($key);
}
#[\ReturnTypeWillChange]
public function offsetSet($key, $value)
{
return Arr::set($this->packageInfo, $key, $value);
}
#[\ReturnTypeWillChange]
public function offsetUnset($key)
{
unset($this->packageInfo[$key]);