I am at the top of the controller method:
namespace App\Http\AdminControllers;
public function signIn(Request $request) {
return redirect()->intended('Am/Index/index', $request);
}
This will jump to the index method of the Index controller, but now the problem is coming. Instead of jumping, the program reports an error:
Object of class Illuminate\Http\Request could not be converted to int
But I have always written like this before...I don’t know why I reported an error. I just forwarded the request.
Please give me your opinions, thank you all.
Of course you are not right
Let’s take a look at the definition of
intended
https://laravel.com/api/5.1/I...
The first parameter is the URL to jump to, the default is homepage
The second parameter is the http status code, the default is 302, and the int type is required because it is a redirection
Looking at your usage method, you passed the $request object in the second parameter. This required parameter does not meet the requirements
So the error
could not be converted to int
is that it cannot be converted into int type