title: Redirecting to different page in Laravel
body: <p>I am trying to redirect to a different page inside my application and cannot figure out what is wrong in my setup.</p>
  
  <p>For redirecting I am using </p>
  
  <pre><code>  if($A-&gt;str_sifra!=$sifra)
        echo "Molimo pokušajte ponovo.";
    else
        return redirect('a_home');
  </code></pre>
  
  <p>In my web.php file there is a route defined</p>
  
  <pre><code>Route::get('PageController@a_home', function () {
     return view('a_home');
  });
  </code></pre>
  
  <p>When I run the page it just reloads it with a shift to right in a view. What am I missing?</p>