Created
July 21, 2015 10:05
-
-
Save MicroHank/626580b1aa6730858519 to your computer and use it in GitHub Desktop.
Laravel 交易函數使用參數
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
交易函數可以使用一個變數 | |
DB::transaction(function ($param) use ($param) { | |
$output = DB::table($param)->get(); | |
}) ; | |
以下範例是錯誤的 | |
DB::transaction(function ($p1,$p2,$p3) use ($p1,$p2,$p3) { | |
...code... | |
}) ; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment