One way of doing what you want to achieve is
public function store(StoreProductRequest $old_request){
if ($old_request->type == 'MOVIE'){
$request = new Requests\StoreMovieRequest;
$this->validate($old_request, $request->rules());
//validation passed for StoreMovieRequest
}
else {
$request = new Requests\StoreSoftwareRequest;
$this->validate($old_request, $request->rules());
//validation passed for StoreSoftwareRequest
}
}
Source: http://stackoverflow.com/questions/33504426/laravel-multiple-form-request-validation
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community