Last active
June 24, 2018 20:53
-
-
Save mouyong/e40c705c4aa8dcea82cf1ee71bcae735 to your computer and use it in GitHub Desktop.
Revisions
-
mouyong revised this gist
Jun 24, 2018 . 1 changed file with 12 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -3,4 +3,16 @@ if (!function_exists('get_current_router_bind')) { function get_current_router_bind_key() { dd(key(array_reverse(last(last(debug_backtrace(0)[2]))))); } } // UserController // update(Request $request, User get_current_router_bind_key()) public function update(Request $request, User $user) { get_current_router_bind_key(); $this->authorize('update', $user); $user->update(array_only($request->all(), $user->getFillable())); return $this->success($user); } -
mouyong revised this gist
Jun 24, 2018 . 2 changed files with 6 additions and 13 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -1,13 +0,0 @@ This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,6 @@ // helpers.php if (!function_exists('get_current_router_bind')) { function get_current_router_bind_key() { dd(key(array_reverse(last(last(debug_backtrace(0)[2]))))); } } -
mouyong revised this gist
Jun 24, 2018 . 1 changed file with 8 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -1,6 +1,13 @@ // Illuminate\Routing\Controller public function callAction($method, $parameters) { get_current_router_bind(); return call_user_func_array([$this, $method], $parameters); } // helpers.php if (!function_exists('get_current_router_bind')) { function get_current_router_bind() { dd(array_reverse(head(debug_backtrace(0))['args'][1])); } } -
mouyong revised this gist
Jun 24, 2018 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -1,6 +1,6 @@ // Illuminate\Routing\Controller public function callAction($method, $parameters) { dd(array_reverse(head(debug_backtrace(0))['args'][1])); return call_user_func_array([$this, $method], $parameters); } -
mouyong created this gist
Jun 24, 2018 .There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,6 @@ // Illuminate\Routing\Controller public function callAction($method, $parameters) { dd(array_reverse(debug_backtrace(0)[0]['args'][1])); return call_user_func_array([$this, $method], $parameters); }