Skip to content

Commit

Permalink
Merge pull request #268 from blendbyte/main
Browse files Browse the repository at this point in the history
[BREAKING CHANGE] Nova 5.0 Support
  • Loading branch information
Tarpsvo authored Dec 17, 2024
2 parents 6c4cd70 + b4138b1 commit 9daae76
Show file tree
Hide file tree
Showing 4 changed files with 43 additions and 29 deletions.
6 changes: 3 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@
],
"license": "MIT",
"require": {
"php": ">=8.0",
"laravel/nova": "^4.32",
"nova-kit/nova-packages-tool": "^1.12",
"php": "^8.1",
"laravel/nova": "^5.0",
"outl1ne/nova-translations-loader": "^5.0"
},
"require-dev": {
"laravel/nova-devtool": "^1.0",
"nova-kit/nova-devtool": "^1.2.1",
"nunomaduro/collision": "^7.8",
"orchestra/testbench": "^8.19"
Expand Down
58 changes: 36 additions & 22 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@
"format": "prettier --write 'resources/**/*.{js,scss,vue}'"
},
"devDependencies": {
"laravel-nova-devtool": "file:vendor/laravel/nova-devtool",
"@inertiajs/inertia": "^0.11.1",
"@vue/babel-plugin-jsx": "^1.1.1",
"@vue/compiler-sfc": "^3.2.40",
"axios": "^1.6.0",
"cross-env": "^7.0.3",
"form-backend-validation": "^2.4.0",
"laravel-mix": "^6.0.49",
"postcss": "^8.4.17",
"postcss-import": "^15.0.0",
Expand Down
6 changes: 3 additions & 3 deletions src/Multiselect.php
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ public function asyncResource($resourceClass, $keyName = null)
return $this->api($apiUrl, $resourceClass, $keyName);
}

protected function resolveAttribute($resource, $attribute)
protected function resolveAttribute($resource, string $attribute): mixed
{
$singleSelect = $this->meta['singleSelect'] ?? false;
$value = data_get($resource, str_replace('->', '.', $attribute));
Expand Down Expand Up @@ -140,7 +140,7 @@ private function shouldSaveAsJson($model, $attribute)
return false;
}

public function resolveForAction($request)
public function resolveForAction($request): void
{
if (!is_null($this->value)) {
return;
Expand All @@ -156,7 +156,7 @@ public function resolveForAction($request)
}
}

public function resolveDefaultValue(NovaRequest $request)
public function resolveDefaultValue(NovaRequest $request): mixed
{
if (!$this->resourceClass || !is_null($this->value)) return parent::resolveDefaultValue($request);

Expand Down

0 comments on commit 9daae76

Please sign in to comment.