📜  雄辩的限制与采取 - PHP 代码示例

📅  最后修改于: 2022-03-11 14:53:57.403000             🧑  作者: Mango

代码示例1
"limit" only works on eloquent ORM or query builder objects 
whereas "take" works on both collections and the ORM or Query Builder objects.

Model::get()->take(20);   // Correct
Model::get()->limit(20);  // Incorrect

Model::take(20)->get()    // Correct
Model::limit(20)->get()   // Correct