2013-12-09 76 views

回答

60

也得到了軟刪除模型

$trashedAndNotTrashed = Model::withTrashed()->get(); 

只有軟刪除的模型在搜索結果中

$onlySoftDeleted = Model::onlyTrashed()->get(); 
+1

鏈接到文檔:http://laravel.com/docs/5.1/eloquent#querying ·軟刪除的模型 – user

相關問題