2 DB objects for the same resource
I have two database objects:
• mts_tbl_products_main (a table)
• v_products_main (a view)
Both have a common field: id (product ID).
In my ProductResource.php:
• For public static function table(Table $table): Table, I want to use v_products_main
• For public static function form(Form $form): Form, I want to use mts_tbl_products_main
Is this possible?
Because the view contains much more detailed fields that I want to display in the table, but for editing/creating I only want to use the base table.
• mts_tbl_products_main (a table)
• v_products_main (a view)
Both have a common field: id (product ID).
In my ProductResource.php:
• For public static function table(Table $table): Table, I want to use v_products_main
• For public static function form(Form $form): Form, I want to use mts_tbl_products_main
Is this possible?
Because the view contains much more detailed fields that I want to display in the table, but for editing/creating I only want to use the base table.