Created
October 11, 2016 13:36
-
-
Save molayli/2cde1317bb81fd2734fdd1a6f63ce46c to your computer and use it in GitHub Desktop.
Revisions
-
molayli created this gist
Oct 11, 2016 .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,27 @@ <?php //..... if(!function_exists('freeRedirect')){ function freeRedirect($to = '/'){ throw new \Illuminate\Http\Exception\HttpResponseException(redirect($to)); } } //............. //usage class AbcController extends Controller{ public function aMethod(){ freeRedirect('/to/another/route'); } }