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'));
    }
}
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b3a5d3-2c1fd.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b3a5d3-2c1fd.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?