F
F
freelancer0072016-04-11 16:46:53
Laravel
freelancer007, 2016-04-11 16:46:53

Why is Laravel's redirect() not working?

Connected at the beginning

use App\Http\Requests;
use Illuminate\Http\Request;
use Redirect;

public function test(){
        redirect('1111');
}

Please help me with advice, I just started with Laravel

Answer the question

In order to leave comments, you need to log in

2 answer(s)
V
Vladislav Soprun, 2016-04-11
@freelancer007

redirect('where')->send();

D
D', 2016-04-11
@Denormalization

redirect is a function. You don't need to connect anything.
You just need to return it:

public function test()
{
  return redirect('123');
}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question