How to extract the same code part of the laravel controller into a common part

now there are user An and user B platforms, both of which have a page with income and expenditure records. So the contents of the two controllers are basically the same, but there are still some differences, such as

 return view"";

because there are also small differences in the middle. So I don"t know what good way to extract it.

The

view section has the @ yield,@section way. Whether the controller has a similar way.

Jul.10,2022

No, package the method yourself

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-1beec59-3146b.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-1beec59-3146b.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?