desc sort to direction

This commit is contained in:
aslan 2024-03-13 14:29:58 +03:00
parent 858492cd2e
commit 27cbb5d8cf
1 changed files with 1 additions and 1 deletions

View File

@ -28,7 +28,7 @@ class DirectionController extends Controller
{
public function index(): View|Application|Factory|\Illuminate\Contracts\Foundation\Application
{
$directions = Direction::all();
$directions = Direction::all()->sortBy('created_at', SORT_REGULAR, true);
return view('admin.catalog.direction.index', compact('directions'));
}