Photo by Raphael Nogueira on Unsplash
laravel nova , it’s a great administration panel for laravel , making it easy to just start your app immediately .
in nova , when you group all the resources with :
public static $group = "admin";
nova will display all the resources without any sorting , you can simply fix this by adding the property :
public static $sorting = 1;
and in your navigation.blade.php
after :
@if (count($resources) > 0)
add :
@php
$resources = $resources->sortBy(function($resource){
return $resource::$sorting ?? 1;
});
@endphp
this will display the in the desired sorting .
I hope this would help some one .