-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
92afacf
commit 6b25d8e
Showing
9 changed files
with
41 additions
and
210 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,12 @@ | ||
# Nova menu manager Upgrade guide | ||
|
||
## From v6 to v7 | ||
|
||
Laravel Nova Menu now uses [Laravel Linkable](https://github.com/novius/laravel-linkable) to manage linkable routes and models. Please read the documentation. | ||
|
||
* The config keys `linkable_objects` and `linkable_routes` are now delegate to Laravel Linkable. You can remove them from the config file `laravel-nova-menu` and report their value in the new `laravel-linkable` config file. | ||
* Modify all your models using \Novius\LaravelNovaMenu\Traits\Linkable trait to use the new \Novius\LaravelLinkable\Traits\Linkable. You can remove `linkableUrl` and `linkableTitle` method of your model. | ||
|
||
## From v5 to v6 | ||
|
||
The blade directive `@menu` is deprecated and will be removed in future versions. Use blade component `<x-laravel-nova-menu::menu />` instead. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,13 +18,13 @@ | |
"php": "^8.1", | ||
"laravel/nova": "^4.0", | ||
"illuminate/support": "^9.0 | ^10.0 | ^11.0", | ||
"novius/laravel-linkable": "^1.0", | ||
"novius/laravel-nova-order-nestedset-field": "^4.0", | ||
"spatie/laravel-sluggable": "^3.4.0" | ||
}, | ||
"require-dev": { | ||
"laravel/pint": "^1.7", | ||
"orchestra/testbench": "^7.4.0", | ||
"phpunit/phpunit": "^9.3.3" | ||
"orchestra/testbench": "^9.2" | ||
}, | ||
"autoload": { | ||
"psr-4": { | ||
|
@@ -44,18 +44,22 @@ | |
} | ||
}, | ||
"scripts": { | ||
"fmt": [ | ||
"cs-fix": [ | ||
"./vendor/bin/pint -v" | ||
], | ||
"lint": [ | ||
"@composer fmt -- --test" | ||
"@composer cs-fix -- --test" | ||
], | ||
"test": "vendor/bin/phpunit --verbose --log-junit phpunit.log.xml" | ||
}, | ||
"repositories": [ | ||
{ | ||
"type": "composer", | ||
"url": "https://nova.laravel.com" | ||
}, | ||
{ | ||
"type": "vcs", | ||
"url": "[email protected]:novius/laravel-linkable.git" | ||
} | ||
], | ||
"config": { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 18 additions & 0 deletions
18
database/migrations/2024_08_06_124510_update_menu_items_internal_link.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<?php | ||
|
||
use Illuminate\Database\Migrations\Migration; | ||
use Illuminate\Support\Facades\DB; | ||
|
||
return new class extends Migration | ||
{ | ||
public function up(): void | ||
{ | ||
DB::table('nova_menu_items') | ||
->whereLike('internal_link', 'linkable_route%') | ||
->update(['internal_link' => DB::raw("REPLACE(`internal_link`, 'linkable_route', 'route')")]); | ||
|
||
DB::table('nova_menu_items') | ||
->whereLike('internal_link', 'linkable_object%') | ||
->update(['internal_link' => DB::raw("REPLACE(`internal_link`, 'linkable_object:', '')")]); | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.