| Conditions | 3 | 
| Paths | 4 | 
| Total Lines | 17 | 
| Code Lines | 9 | 
| Lines | 0 | 
| Ratio | 0 % | 
| Changes | 1 | ||
| Bugs | 1 | Features | 0 | 
| 1 | <?php | ||
| 26 | public function image($dir, $image, $width = null, $height = null, array $options = [], array $attributes = []) | ||
| 27 |     { | ||
| 28 | $attributes = array_replace_recursive($this->attributes, $attributes); | ||
| 29 | $options = array_replace_recursive($this->options, $options); | ||
| 30 | |||
| 31 |         $path = config('laravelimage.routePath') . '/' . $dir . $image . '?' . http_build_query($options, '', '&'); | ||
| 32 | |||
| 33 |         if ( ! empty((int) $width)) { | ||
| 34 | $path .= '&w=' . (int) $width; | ||
| 35 | } | ||
| 36 | |||
| 37 |         if ( ! empty((int) $height)) { | ||
| 38 | $path .= '&h=' . (int) $height; | ||
| 39 | } | ||
| 40 | |||
| 41 | return '<img src="' . asset($path) . '" ' . $this->buildAttributes($attributes) . ' />'; | ||
| 42 | } | ||
| 43 | |||
| 63 |