title: Laravel 4, redirect and stop executing function
body: <p>I have created one function for authentication and i have created another function for checking parameters. The function checkParameters accepts 2 parameters, array with input parameters that will need to be validate and the other parameter is redirectto for the route where i want to redirect. 
  I call the function checkParameters inside function authenticate.
  The problem is, if the validator does not run, it means that some fields are empty, i want to redirect that function. But problem occurs when the function redirects but it does not stop execution, it continues to excecute authentication function, makes api request without parameters.
  How can i redirect and stop the function, to not execute the rest of the code. I want something similar like this:</p>
  
  <pre><code>Redirect::to($redirectto)-&gt;send();
  die();
  </code></pre>