Do you post with email and password data ?
Jun 29, 2015
10
Level 3
Laravel 5 Custom Request not working
Something weird is happening in my app:
Route:
Route::resource('users', 'UserController');
Controller:
use App\Http\Requests\UserRequest;
...
public function store(UserRequest $request) {
dd($request);
}
UserRequest:
public function authorize()
{
return true;
}
public function rules()
{
return [
'email' => 'required|email',
'password' => 'required'
];
}
When I make a POST to /users , it redirects to "/"
if I change the injection to:
public function store(Request $request)
It works as intended.
Please or to participate in this conversation.