v0.10.20d - Fixed RootController.php

This commit is contained in:
Anders 2020-08-31 15:26:25 +02:00
parent 25c279653b
commit ca855f3349
1 changed files with 2 additions and 2 deletions

View File

@ -31,12 +31,12 @@ class RootController extends Controller
if(Response::detect("root.index")->name() == "admin.root.index")
return view("admin.root.index");
else {
$news = News::query()->join('news_types', 'news_types.id', '=', 'news.type_id')->orderBy('id', 'desc')->get();
$news = News::query()->join('news_types', 'news_types.id', '=', 'news.type_id')->orderBy('news.id', 'desc')->get();
return view("app.root.index", ["news" => $news]);
}
}
else {
$news = News::query()->join('news_types', 'news_types.id', '=', 'news.type_id')->orderBy('id', 'desc')->get();
$news = News::query()->join('news_types', 'news_types.id', '=', 'news.type_id')->orderBy('news.id', 'desc')->get();
return Response::detect('root.index', ["news" => $news]);
}