original_string: public function postAddPhotos(Request $request)
      {
          if (!$request->hasFile('photos')) {
              return response('', 400);
          }
  
          foreach ($request->file('photos') as $file) {
              $photo = Photo::upload($file->getRealPath());
  
              session()->push('photos', [
                  'photo_id' => $photo->getKey(),
                  'filename' => $file->getClientOriginalName(),
              ]);
          }
      }
code: public function postAddPhotos(Request $request)
      {
          if (!$request->hasFile('photos')) {
              return response('', 400);
          }
  
          foreach ($request->file('photos') as $file) {
              $photo = Photo::upload($file->getRealPath());
  
              session()->push('photos', [
                  'photo_id' => $photo->getKey(),
                  'filename' => $file->getClientOriginalName(),
              ]);
          }
      }
code_tokens: public function postAddPhotos ( Request $ request ) { if ( ! $ request -> hasFile ( 'photos' ) ) { return response ( '' , 400 ) ; } foreach ( $ request -> file ( 'photos' ) as $ file ) { $ photo = Photo :: upload ( $ file -> getRealPath ( ) ) ; session ( ) -> push ( 'photos' , [ 'photo_id' => $ photo -> getKey ( ) , 'filename' => $ file -> getClientOriginalName ( ) , ] ) ; } }
docstring: Process and store several photos.
  
  @param \Illuminate\Http\Request $request
  
  @return \Illuminate\Http\RedirectResponse
docstring_tokens: Process and store several photos .