Esempio n. 1
0
public function getIndex()
{
        return view('topics.index',[
'topics' => Topic::orderBy('id', 'desc')->paginate(),
'titlePage' => 'Новые статьи',
]);
}
public function index(){
return view('welcome',[
'topics' => Topic::orderBy('id', 'desc')->limit(9)->get(),
'questions' => Question::orderBy('id','desc')->limit(9)->get()
]);
}