original_string: public function cropPhotos($event)
      {
          $this->filesystem = config('admin.storage.disk');
          $this->folder = config('admin.images.cropper.folder') . '/' . $event->slug;
          $this->quality = config('admin.images.cropper.quality', 100);
  
          $this->request = $event->request;
          $this->dataType = $event->dataType;
          $this->model = $event->model;
  
          $cropperImages = $this->dataType->rows()->whereType('image')
              ->where('details', 'like', '%cropper%')->get();
  
          foreach ($cropperImages as $dataRow) {
              $details = json_decode($dataRow->details);
  
              if (!isset($details->cropper)) {
                  continue;
              }
  
              if (!$this->request->{$dataRow->field}) {
                  continue;
              }
  
              $this->cropPhoto($details->cropper, $dataRow);
          }
  
          return true;
      }
code: public function cropPhotos($event)
      {
          $this->filesystem = config('admin.storage.disk');
          $this->folder = config('admin.images.cropper.folder') . '/' . $event->slug;
          $this->quality = config('admin.images.cropper.quality', 100);
  
          $this->request = $event->request;
          $this->dataType = $event->dataType;
          $this->model = $event->model;
  
          $cropperImages = $this->dataType->rows()->whereType('image')
              ->where('details', 'like', '%cropper%')->get();
  
          foreach ($cropperImages as $dataRow) {
              $details = json_decode($dataRow->details);
  
              if (!isset($details->cropper)) {
                  continue;
              }
  
              if (!$this->request->{$dataRow->field}) {
                  continue;
              }
  
              $this->cropPhoto($details->cropper, $dataRow);
          }
  
          return true;
      }
code_tokens: public function cropPhotos ( $ event ) { $ this -> filesystem = config ( 'admin.storage.disk' ) ; $ this -> folder = config ( 'admin.images.cropper.folder' ) . '/' . $ event -> slug ; $ this -> quality = config ( 'admin.images.cropper.quality' , 100 ) ; $ this -> request = $ event -> request ; $ this -> dataType = $ event -> dataType ; $ this -> model = $ event -> model ; $ cropperImages = $ this -> dataType -> rows ( ) -> whereType ( 'image' ) -> where ( 'details' , 'like' , '%cropper%' ) -> get ( ) ; foreach ( $ cropperImages as $ dataRow ) { $ details = json_decode ( $ dataRow -> details ) ; if ( ! isset ( $ details -> cropper ) ) { continue ; } if ( ! $ this -> request -> { $ dataRow -> field } ) { continue ; } $ this -> cropPhoto ( $ details -> cropper , $ dataRow ) ; } return true ; }
docstring: Save cropped photos.
  
  @param Illuminate\Http\Request                 $request
  @param string                                  $slug
  @param Illuminate\Database\Eloquent\Collection $dataType
  @param Illuminate\Database\Eloquent\Model      $model
  
  @return bool
docstring_tokens: Save cropped photos .