Laravel Eloquent: Accessing properties and Dynamic Table Names

http://laravel.com/

http://kejyun.github.io/Laravel-4-Docum ... roduction/
回覆文章
yehlu
Site Admin
文章: 3244
註冊時間: 2004-04-15 17:20:21
來自: CodeCharge Support Engineer

Laravel Eloquent: Accessing properties and Dynamic Table Names

文章 yehlu »

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...
回覆文章

回到「laravel」