desc sort to direction
Tests & Lint & Deploy to Railway / build (2.6.6, 20.x, 8.3) (push) Successful in 1m48s Details
Tests & Lint & Deploy to Railway / deploy (push) Successful in 31s Details

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'));
}