如何在laravel控制器中一次执行多个方法

I have a dashboard page where I want to display multiple functionalities like displaying a form, showing a list of articles from database.

But, since routes can allow only one method to run at a time for each route, how can I achieve it?

I want to do something like this

Route::get('/dashboard','Dashboard@index');
Route::get('/dashboard','Dashboard@showArticles');
Route::get('/dashboard','Dashboard@showUsersList');

I know this doesn't work, but what is the alternative? Since I want to do all this on the same page.

You have to combine all methods in single method like this and pass it to view

public function getIndex()
{
  $users = User::all();
  $articles = Articles::all();
  return view('page.your_view')->with('users', $users)->with('articles', 'articles'); 
}
Route::get('/dashboard/{?type}','Dashboard@index');

In controller

public function getIndex($type)
{
    if(isset($type) && !empty($type) && $type=='article'){ 
           return $this->article();
    }
  return view('page.index'); 
}
public function article(){
       ...YOUR CODE
}

You can achieve by using,

public function index()
{
  $users = User::all();
  $articles = Articles::all();
  return view('page.your_view', compact(['users' => $users, 'articles' => 'articles']); 
}