src/Helpers/Thumbnail.php
public function create($filename, $width, $height = null)
    {
        try {
            $image = app('image')->make($this->file->realPath)
                ->fit($width, ($height ?: $width))
                ->encode();

            $this->file->storage->put($this->file->path($filename), $image);
        } catch (NotReadableException $e) {
            return null;
        }

        return $this->file->storage->url($this->file->path($filename));
    }
public function create($filename, $width, $height = null)
    {
        try {
            $image = app('image')->make($this->file->realPath)
                ->fit($width, ($height ?: $width))
                ->encode();

            $this->file->storage->put($this->file->path($filename), $image);
        } catch (NotReadableException $e) {
            return null;
        }

        return $this->file->storage->url($this->file->path($filename));
    }
public function create ( $ filename , $ width , $ height = null ) { try { $ image = app ( 'image' ) -> make ( $ this -> file -> realPath ) -> fit ( $ width , ( $ height ? : $ width ) ) -> encode ( ) ; $ this -> file -> storage -> put ( $ this -> file -> path ( $ filename ) , $ image ) ; } catch ( NotReadableException $ e ) { return null ; } return $ this -> file -> storage -> url ( $ this -> file -> path ( $ filename ) ) ; }
Create thumbnail.

@param  string $filename
@param  integer $width
@param  integer|null $height
@return string
Create thumbnail .