How to get the data values of 5 different tables in one controller and transfer them to the view at the same time? For example, the table is a b c d e.

how do I get data from five different tables in one controller and transfer values to the view at the same time? For example, the table is a b c d e

Apr.19,2021

the question you gave is not careful enough. Personal understanding:

class TestController extends Controller {
    public function index()
    {
        $a = A::all();
        
        $e = E::all();
        return view('test', compact('a','b','c','d','e'));
    }
}
Menu