Laravel Eloquent: Accessing properties and Dynamic Table Names
發表於 : 2019-09-16 10:13:14
https://stackoverflow.com/questions/267 ... able-names
代碼: 選擇全部
$product = new Product;
$product->getTable(); // products
$product->setTable('oooops');
$product->get(); // select * from oooops
$product->first(); // select * from oooops limit 1
etc...