I use a request class to create a Project.
public function store(ProjectFormRequest $request)
{
return \Redirect::route('projects');
}
Each Project should contain n images. How can I safe the images, which are in the $request to the database coming from a Form but IN the Request class?
Normally I would foreach the form input field, upload the images, save the images and attach / sync it with the Project model (one to many relationship; one Project has many images; one image has one Project).
How can I do that in the Request class? Or do I need to do it in the controller store() method?