v0.10.20d - Fixed RootController.php
This commit is contained in:
parent
25c279653b
commit
ca855f3349
|
@ -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]);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue