如何按照客户的意愿更改订单的顺序?
答案 0 :(得分:0)
Laravel\Nova\Tools\ResourceManager
的副本。您在"files"
"autoload"
键
"autoload": {
"psr-4": {
"App\\": "app/"
},
"classmap": [
"database/seeds",
"database/factories"
],
"files": ["app/<your path>/ResourceManager.php"]
},
在 ResourceManager.php 中,您进行更改
public function renderNavigation()
{
$request = request();
$groups = Nova::groups($request);
$newNavigation = collect([
'Group1' => collect([
Resource1::class,
Resource2::class,
Resource3::class,
]),
'Group2' => collect([
Resource4::class,
Resource5::class,
]),
]);
return view('nova::resources.navigation', [
'navigation' => $newNavigation,
'groups' => $groups,
]);
}